diff options
| author | tmk <nobody@nowhere> | 2013-10-08 12:23:25 +0900 |
|---|---|---|
| committer | tmk <nobody@nowhere> | 2013-10-08 12:23:25 +0900 |
| commit | e8e8f93bcf0cdc8d72d35662db5a1da4716762b8 (patch) | |
| tree | 70d355d125b724092f8891bee3753e169063725e | |
| parent | 63b3e2cbfbca26ca3705542fa241f6604d6aadda (diff) | |
| download | qmk_firmware-e8e8f93bcf0cdc8d72d35662db5a1da4716762b8.tar.gz qmk_firmware-e8e8f93bcf0cdc8d72d35662db5a1da4716762b8.zip | |
Fix ADB missing keystrokes problem Thanks, blargg! #14
- Add delay between scans to prevent overlaod of ADB keyboard controllers
- <http://geekhack.org/index.php?topic=14290.msg1068919#msg1068919>
| -rw-r--r-- | converter/adb_usb/matrix.c | 1 | ||||
| -rw-r--r-- | protocol/adb.c | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/converter/adb_usb/matrix.c b/converter/adb_usb/matrix.c index ee17f655f..566592c93 100644 --- a/converter/adb_usb/matrix.c +++ b/converter/adb_usb/matrix.c | |||
| @@ -85,6 +85,7 @@ uint8_t matrix_scan(void) | |||
| 85 | uint8_t key0, key1; | 85 | uint8_t key0, key1; |
| 86 | 86 | ||
| 87 | is_modified = false; | 87 | is_modified = false; |
| 88 | _delay_ms(16); // delay for preventing overload of poor ADB keyboard controller | ||
| 88 | codes = adb_host_kbd_recv(); | 89 | codes = adb_host_kbd_recv(); |
| 89 | key0 = codes>>8; | 90 | key0 = codes>>8; |
| 90 | key1 = codes&0xFF; | 91 | key1 = codes&0xFF; |
diff --git a/protocol/adb.c b/protocol/adb.c index e4e26b7d7..155d223fe 100644 --- a/protocol/adb.c +++ b/protocol/adb.c | |||
| @@ -83,6 +83,12 @@ bool adb_host_psw(void) | |||
| 83 | } | 83 | } |
| 84 | #endif | 84 | #endif |
| 85 | 85 | ||
| 86 | /* | ||
| 87 | * Don't call this in a row without the delay, otherwise it makes some of poor controllers | ||
| 88 | * overloaded and misses strokes. Recommended delay is 16ms. | ||
| 89 | * | ||
| 90 | * Thanks a lot, blargg! <http://geekhack.org/index.php?topic=14290.msg1068919#msg1068919> | ||
| 91 | */ | ||
| 86 | uint16_t adb_host_kbd_recv(void) | 92 | uint16_t adb_host_kbd_recv(void) |
| 87 | { | 93 | { |
| 88 | uint16_t data = 0; | 94 | uint16_t data = 0; |
