- extern inline void set_##a(u8 b); \
- extern inline void bset_##a(u8 m); \
- extern inline void bclr_##a(u8 m); \
-
-buffered_addr_h(switch_input);
-buffered_addr_h(misc_input);
-buffered_addr_h(home_sensors);
-buffered_addr_h(changer_output);
-buffered_addr_h(misc_output);
-
-void spi_enable();
-void spi_disable();
-
-/******* from display.c *******/
-
-/* scrolling modes */
-#define WRAP_SCROLL_L 1 /* scroll to the left */
-#define WRAP_SCROLL_R 2 /* scroll to the right */
-#define WRAP_ALTERNATE 3 /* alternate between text */
-
-extern char current_message[256];
-
-void display_init();
-void set_msg(char* newmsg);
-void set_wrap_mode(u8 new_wrap_mode);
-void display_refresh();
-
+ u8 a; \
+ extern inline void set_##a(u8 b) { a = *_##a = b; } \
+ extern inline void bset_##a(const u8 m) { bset(&a, m); *_##a = a; } \
+ extern inline void bclr_##a(const u8 m) { bclr(&a, m); *_##a = a; }
+
+buffered_addr(changer_output);
+buffered_addr(misc_output);
+
+extern volatile u8 _switch_input;
+#define switch_input _switch_input
+extern volatile u8 _misc_input;
+#define misc_input _misc_input
+extern volatile u8 _home_sensors;
+#define home_sensors _home_sensors
+
+/******* from helpers.c *******/