adb_usb: Fix for devices that can't change address
Poll default address when Service Request is asserted https://github.com/tmk/tmk_keyboard/issues/733
This commit is contained in:
parent
f1f32a743f
commit
c3e86bd75c
1 changed files with 2 additions and 0 deletions
|
|
@ -392,6 +392,7 @@ void adb_mouse_task(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
len = adb_host_talk_buf(ADB_ADDR_MOUSE_POLL, ADB_REG_0, buf, sizeof(buf));
|
len = adb_host_talk_buf(ADB_ADDR_MOUSE_POLL, ADB_REG_0, buf, sizeof(buf));
|
||||||
|
if (!len && adb_service_request()) len = adb_host_talk_buf(ADB_ADDR_MOUSE, ADB_REG_0, buf, sizeof(buf));
|
||||||
|
|
||||||
// If nothing received reset mouse acceleration, and quit.
|
// If nothing received reset mouse acceleration, and quit.
|
||||||
if (len < 2) {
|
if (len < 2) {
|
||||||
|
|
@ -616,6 +617,7 @@ uint8_t matrix_scan(void)
|
||||||
tick_ms = timer_read();
|
tick_ms = timer_read();
|
||||||
|
|
||||||
codes = adb_host_kbd_recv(ADB_ADDR_KBD_POLL);
|
codes = adb_host_kbd_recv(ADB_ADDR_KBD_POLL);
|
||||||
|
if (!codes && adb_service_request()) codes = adb_host_kbd_recv(ADB_ADDR_KEYBOARD);
|
||||||
if (codes) xprintf("%04X ", codes);
|
if (codes) xprintf("%04X ", codes);
|
||||||
|
|
||||||
// Adjustable keybaord media keys
|
// Adjustable keybaord media keys
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue