Bunch of silly errors & debugging stuff.
[uccvend-snackrom.git] / ROM2 / vend.h
index f3b0e65..c7650ca 100644 (file)
  * with buffered_addr, and also in LDFLAGS in the Makefile
  */
 #define buffered_addr(a) \
-       extern volatile u8* _##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; }
+       extern inline void set_##a(u8 b) { a = b; _##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)
+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
 
 extern u16 _stack;
 
@@ -51,7 +51,8 @@ void my_memcpy(char* dst, char* src, u8 size);
 #define A3000_MOTOR_ROW_DISABLE 0x80
 
 /* Address 3800 bits */
-#define A3800_DISPLAY_WRITE  0x04
+#define A3800_KEYPAD_STROBE 0x04
+#define A3800_DISPLAY_WRITE  0x08
 #define A3800_MOTOR_DATA        0x10
 #define A3800_MOTOR_COL8_ENABLE 0x20
 #define A3800_MOTOR_COL9_ENABLE 0x40

UCC git Repository :: git.ucc.asn.au