]> git.friedersdorff.com Git - max/tmk_keyboard.git/commitdiff
adb_usb: Add scan code print
authortmk <hasu@tmk-kbd.com>
Mon, 4 Jan 2021 06:53:21 +0000 (15:53 +0900)
committertmk <hasu@tmk-kbd.com>
Mon, 4 Jan 2021 06:53:21 +0000 (15:53 +0900)
converter/adb_usb/matrix.c

index f4bf50c1f5af375f2da651f0af85e127e821616f..cf57295fec3b8057f48a24b14fc5d15251b97f58 100644 (file)
@@ -387,10 +387,12 @@ uint8_t matrix_scan(void)
         tick_ms = timer_read();
 
         codes = adb_host_kbd_recv(ADB_ADDR_KEYBOARD);
+        if (codes) xprintf("%04X ", codes);
 
         // Adjustable keybaord media keys
         if (codes == 0 && has_media_keys &&
                 (codes = adb_host_kbd_recv(ADB_ADDR_APPLIANCE))) {
+            xprintf("m:%04X ", codes);
             // key1
             switch (codes & 0x7f ) {
             case 0x00:  // Mic
@@ -434,10 +436,6 @@ uint8_t matrix_scan(void)
     key0 = codes>>8;
     key1 = codes&0xFF;
 
-    if (debug_matrix && codes) {
-        print("adb_host_kbd_recv: "); phex16(codes); print("\n");
-    }
-
     if (codes == 0) {                           // no keys
         return 0;
     } else if (codes == 0x7F7F) {   // power key press