Browse Source

Change ADB scan delay 12ms

led_matrix
tmk 10 years ago
parent
commit
86082f90fa
2 changed files with 5 additions and 3 deletions
  1. 1
    1
      converter/adb_usb/matrix.c
  2. 4
    2
      protocol/adb.c

+ 1
- 1
converter/adb_usb/matrix.c View File

uint8_t key0, key1; uint8_t key0, key1;


is_modified = false; is_modified = false;
_delay_ms(16); // delay for preventing overload of poor ADB keyboard controller
_delay_ms(12); // delay for preventing overload of poor ADB keyboard controller
codes = adb_host_kbd_recv(); codes = adb_host_kbd_recv();
key0 = codes>>8; key0 = codes>>8;
key1 = codes&0xFF; key1 = codes&0xFF;

+ 4
- 2
protocol/adb.c View File



/* /*
* Don't call this in a row without the delay, otherwise it makes some of poor controllers * Don't call this in a row without the delay, otherwise it makes some of poor controllers
* overloaded and misses strokes. Recommended delay is 16ms.
* overloaded and misses strokes. Recommended interval is 12ms.
* *
* Thanks a lot, blargg! <http://geekhack.org/index.php?topic=14290.msg1068919#msg1068919>
* Thanks a lot, blargg!
* <http://geekhack.org/index.php?topic=14290.msg1068919#msg1068919>
* <http://geekhack.org/index.php?topic=14290.msg1070139#msg1070139>
*/ */
uint16_t adb_host_kbd_recv(void) uint16_t adb_host_kbd_recv(void)
{ {