keypad fix
authorBernard Blackham <[email protected]>
Fri, 15 Aug 2003 15:31:22 +0000 (15:31 +0000)
committerBernard Blackham <[email protected]>
Fri, 15 Aug 2003 15:31:22 +0000 (15:31 +0000)
enable interrupts

ROM2/main_basic.c

index 36ace96..b7c110f 100644 (file)
@@ -98,7 +98,7 @@ void send_keypress(u8 key) {
        if (key == KEY_RESET)
                tx_buffer[1] = 'R';
        else
-               tx_buffer[1] = key+'0';
+               tx_buffer[1] = (key%10)+'0';
        tx_buffer[2] = '\n';
        tx_buffer[3] = 0;
        send_packet();
@@ -130,12 +130,15 @@ int main() {
        _io_ports[M6811_DDRD] = 0x3e;
        _io_ports[M6811_SPCR] = 0x12;
 
+       unlock(); /* enable interrupts */
+
        display_init();
        comm_init();
        coinmech_init();
 
        last_coin_value = 0;
        last_door_open = 0;
+       
        while(1) {
                if (door_open() != last_door_open) {
                        last_door_open = door_open();

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