13 #define STACKSIZE 1024
23 #define STACKSIZE 1024
29 #elif defined ARDUINO_ESP8266_NODEMCU
30 #define STACKSIZE 1024
36 #elif defined ARDUINO_AVR_UNO
46 #define read16() 256*(uint8_t)read_byte() + (uint8_t)read_byte()
47 #define from16(a, b) 256*a+b
48 #define write16(i) { write_byte((uint8_t)(i/256)); write_byte((uint8_t)(i%256)); }
51 bool input_available(void);
52 uint8_t read_byte(void);
53 void write_byte(uint8_t b
);
55 /* Analog and digital pins */
57 void write_dpin(uint8_t i
, bool b
);
58 bool read_dpin(uint8_t i
);
61 void write_apin(uint8_t i
, uint8_t a
);
62 uint8_t read_apin(uint8_t i
);
67 void led_on(uint8_t i
);
68 void led_off(uint8_t i
);
71 /* Delay and communication */
72 unsigned long getmillis(void);
73 void msdelay(unsigned long ms
);
76 void real_setup(void);
77 void debug(char *fmt
, ...);
79 void die(char *fmt
, ...);