Skip to content

Commit

Permalink
add arduino skeleton
Browse files Browse the repository at this point in the history
  • Loading branch information
nakkaya committed Mar 31, 2015
1 parent 69b4f8f commit 0f42320
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions babel.org
Expand Up @@ -3357,6 +3357,36 @@
"Serial.println(" _ ");"
\n >)
(define-abbrev c++-mode-abbrev-table "sprtn" "" 'skel-cpp-println)

(define-skeleton skel-arduino
""
nil
\n >
"#define DEBUG

// Machine States
typedef void *(*StateFunc)();

void *StateBoot(void);

void *StateBoot(){
delay(100);
return (void*)StateBoot;
}

void setup(){
#ifdef DEBUG
Serial.begin(9600);
#endif
}

void loop(){
StateFunc stateFunc = StateBoot;

while(1) {
stateFunc = (StateFunc)(*stateFunc)();
}
}")
#+end_src

** ELisp
Expand Down

0 comments on commit 0f42320

Please sign in to comment.