summaryrefslogtreecommitdiff
path: root/converter/sun_usb/matrix.c
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2014-08-01 13:26:42 +0900
committertmk <nobody@nowhere>2014-08-01 13:26:42 +0900
commit523cc6aa2ed0879c2d297e7060de2962987c8c7a (patch)
tree04deb0e84390623311d572bb131eeceafc509d1b /converter/sun_usb/matrix.c
parent79840c678e13f9a737f80048bc3b9c9c55e3fc77 (diff)
Add build option and Sun specific commands
Diffstat (limited to 'converter/sun_usb/matrix.c')
-rw-r--r--converter/sun_usb/matrix.c16
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