diff options
author | tmk <nobody@nowhere> | 2013-10-14 23:37:05 +0900 |
---|---|---|
committer | tmk <nobody@nowhere> | 2013-10-14 23:37:05 +0900 |
commit | c18c52f551545b46a28902c69730eefbdb75577d (patch) | |
tree | 03ef488ac04d24efc319aa429bfacbade3507c04 /converter/adb_usb/matrix.c | |
parent | 59ecced486618161ab18ea9a95dd51e1414fedb8 (diff) |
Merge blargg's fix into adb.c
- <http://geekhack.org/index.php?topic=14290.msg1075201#msg1075201>
Diffstat (limited to 'converter/adb_usb/matrix.c')
-rw-r--r-- | converter/adb_usb/matrix.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/converter/adb_usb/matrix.c b/converter/adb_usb/matrix.c index 7e58569715..54be2b0f57 100644 --- a/converter/adb_usb/matrix.c +++ b/converter/adb_usb/matrix.c @@ -67,6 +67,13 @@ uint8_t matrix_cols(void) void matrix_init(void) { adb_host_init(); + // wait for keyboard to boot up and receive command + _delay_ms(1000); + // Enable keyboard left/right modifier distinction + // Addr:Keyboard(0010), Cmd:Listen(10), Register3(11) + // upper byte: reserved bits 0000, device address 0010 + // lower byte: device handler 00000011 + adb_host_listen(0x2B,0x02,0x03); // initialize matrix state: all keys off for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00; |