Small cleanups
authorBernard Blackham <[email protected]>
Tue, 12 Aug 2003 07:06:48 +0000 (07:06 +0000)
committerBernard Blackham <[email protected]>
Tue, 12 Aug 2003 07:06:48 +0000 (07:06 +0000)
ROM2/main_basic.c
ROM2/motors.c
ROM2/vectors.s

index ea4da00..8d54ee9 100644 (file)
@@ -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
+                */
        }
 }
 
index 6744839..3fd99a2 100644 (file)
@@ -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 */
index 14ae986..abcfc97 100644 (file)
@@ -56,7 +56,7 @@ vectors:
        .word def               ; ffd4
 
        ;; SCI
-       .word def               ; ffd6
+       .word sci_interrupt     ; ffd6
 
        ;; SPI
        .word def               ; ffd8

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