From c3e86bd75c5230b467db88c0473c4339590bda78 Mon Sep 17 00:00:00 2001 From: tmk Date: Sun, 24 Apr 2022 18:08:03 +0900 Subject: [PATCH] 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 --- converter/adb_usb/matrix.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/converter/adb_usb/matrix.c b/converter/adb_usb/matrix.c index fd33aaaa..e73a7505 100644 --- a/converter/adb_usb/matrix.c +++ b/converter/adb_usb/matrix.c @@ -392,6 +392,7 @@ void adb_mouse_task(void) } 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 (len < 2) { @@ -616,6 +617,7 @@ uint8_t matrix_scan(void) tick_ms = timer_read(); 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); // Adjustable keybaord media keys