More motor work
[uccvend-snackrom.git] / ROM2 / vend.h
index d3e6bf3..c9cc6d6 100644 (file)
 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)
 
 /******* from helpers.c *******/
 void delay(u16 ms);
@@ -32,21 +32,24 @@ void print_amount(u16 amt);
 
 /******** Some meaningful bits ******/
 #define PORTA_CHIME         0x10 /* chime is on when set */
+#define PORTA_MOTOR_CLOCK   0x20
 #define PORTA_MOTOR_COL_DISABLE 0x40
 #define PORTA_DISP_RESET    0x80 /* active low */
 
 #define PORTD_KEYPAD_ROW    0x20 /* clear for row 0, set for row 1 */
 
+#define PORTE_MOTOR_OVERCURRENT 0x01
 #define PORTE_MOTOR_OVERVOLTAGE 0x02
 
 /* Address 3000 bits */
-#define A3000_MOTOR_ROW_ENABLE 0x80
+#define A3000_MOTOR_ROW_DISABLE 0x80
 
 /* Address 1800 bits */
 #define A1800_DOOR_OPEN     0x20
 
 /* Address 3800 bits */
 #define A3800_DISPLAY_WRITE  0x04
+#define A3800_MOTOR_DATA        0x10
 #define A3800_MOTOR_COL8_ENABLE 0x20
 #define A3800_MOTOR_COL9_ENABLE 0x40
 

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