+#include "types.h"
+#include "asm.h"
+
+/* addresses of these set at link time
+ * to add more addresses, define them here with buffered_addr_h, in helpers.c
+ * with buffered_addr, and also in LDFLAGS in the Makefile
+ */
+#define buffered_addr(a) \
+ extern volatile u8* _##a; \
+ 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 *******/
+void delay(u16 ms);
+void print_amount(u16 amt);