From: Bernard Blackham Date: Tue, 12 Aug 2003 07:06:48 +0000 (+0000) Subject: Small cleanups X-Git-Tag: ROMW~71 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=24ecd46fb709e0b5994f6c3fa77c400ae9b92efa;p=uccvend-snackrom.git Small cleanups --- diff --git a/ROM2/main_basic.c b/ROM2/main_basic.c index ea4da00..8d54ee9 100644 --- a/ROM2/main_basic.c +++ b/ROM2/main_basic.c @@ -22,7 +22,26 @@ void _start() { int main() { while(1) { - /* stuff */ + /* + * have serial packet? + * + * decode msg & process: + * - dispense motor + * - display string + * - give change + * - beep + */ + + /* + * have keypress? + * - beep + * - send via serial + */ + + /* + * have coin balance change? + * - send via serial + */ } } diff --git a/ROM2/motors.c b/ROM2/motors.c index 6744839..3fd99a2 100644 --- a/ROM2/motors.c +++ b/ROM2/motors.c @@ -81,7 +81,7 @@ bool left_home(u8 slot) { r = 1 << r; for (i = 0; i < 5; i++) - if (home_sensors & r == 0) return 1; + if ((home_sensors & r) == 0) return 1; /* it never left */ return 0; @@ -94,7 +94,7 @@ bool back_home(u8 slot) { for (i = 0; i < 5; i++) { if (home_sensors & r) return 1; - if (_io_ports[M6811_PORTE] & PORTE_MOTOR_OVERCURRENT == 0) return 1; + if ((_io_ports[M6811_PORTE] & PORTE_MOTOR_OVERCURRENT) == 0) return 1; } /* it never left */ diff --git a/ROM2/vectors.s b/ROM2/vectors.s index 14ae986..abcfc97 100644 --- a/ROM2/vectors.s +++ b/ROM2/vectors.s @@ -56,7 +56,7 @@ vectors: .word def ; ffd4 ;; SCI - .word def ; ffd6 + .word sci_interrupt ; ffd6 ;; SPI .word def ; ffd8