Skip to content

Instantly share code, notes, and snippets.

@beshrkayali
Created February 19, 2021 20:35
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Poly RaspberryPi PIO mode
;; Simple Polymode for RaspberryPi Pico PIO files that uses
;; both asm-mode as host-mode and c-mode for pass-through section
(define-hostmode poly-pio-hostmode
:mode 'asm-mode)
(define-auto-innermode poly-pio-c-innermode
:mode 'c-mode
:head-matcher "^% c-sdk {$"
:tail-matcher "^%}$"
:head-mode 'host
:tail-mode 'host)
(define-polymode poly-pio-mode
:hostmode 'poly-pio-hostmode
:innermodes '(poly-pio-c-innermode
))
(add-to-list 'auto-mode-alist '("\\.pio$" . poly-pio-mode))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment