diff options
Diffstat (limited to 'converter/sun_usb/matrix.c')
-rw-r--r-- | converter/sun_usb/matrix.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/converter/sun_usb/matrix.c b/converter/sun_usb/matrix.c index 988622bc39..f333f542bd 100644 --- a/converter/sun_usb/matrix.c +++ b/converter/sun_usb/matrix.c @@ -65,7 +65,7 @@ void matrix_init(void) { DDRD |= (1<<6); PORTD |= (1<<6); - debug_enable = true; + //debug_enable = true; serial_init(); @@ -86,14 +86,16 @@ uint8_t matrix_scan(void) debug_hex(code); debug(" "); switch (code) { - case 0x7E: // reset fail - case 0xFE: // layout case 0xFF: // reset success + case 0xFE: // layout + case 0x7E: // reset fail + if (code == 0xFF) print("reset: 0xFF "); + if (code == 0x7E) print("reset fail: 0x7E "); + if (code == 0xFE) print("layout: 0xFE "); + // response byte _delay_ms(500); - // ignore response byte - debug("(response ignored:"); - while ((code = serial_recv())) { debug(" "); debug_hex(code); } - debug(") "); + if (code = serial_recv()) print_hex8(code); + print("\n"); // FALL THROUGH case 0x7F: // all keys up |