]> git.friedersdorff.com Git - max/tmk_keyboard.git/commitdiff
ibmpc_usb: Add protocol and isr_debug check
authortmk <hasu@tmk-kbd.com>
Mon, 11 May 2020 04:24:31 +0000 (13:24 +0900)
committertmk <hasu@tmk-kbd.com>
Mon, 11 May 2020 07:12:36 +0000 (16:12 +0900)
converter/ibmpc_usb/ibmpc_usb.c

index 99e65a4a3bfbb29654cae43572fe4ea1a604e3e5..007ab0badbb58bd3168308395b27c449eadefbf4 100644 (file)
@@ -105,6 +105,7 @@ void matrix_init(void)
  *      d. ID is BF BF: Terminal keyboard CodeSet3
  *      e. error on recv: maybe broken PS/2
  */
+uint8_t current_protocol = 0;
 uint16_t keyboard_id = 0x0000;
 keyboard_kind_t keyboard_kind = NONE;
 uint8_t matrix_scan(void)
@@ -141,6 +142,18 @@ uint8_t matrix_scan(void)
         ibmpc_error = IBMPC_ERR_NONE;
     }
 
+    // check ISR state debug
+    if (ibmpc_isr_debug) {
+        xprintf("\nISR:%04X\n", ibmpc_isr_debug);
+        ibmpc_isr_debug = 0;
+    }
+
+    // check protocol AT/XT
+    if (ibmpc_protocol != current_protocol) {
+        xprintf("\nPROTO:%02X\n", ibmpc_protocol);
+        current_protocol = ibmpc_protocol;
+    }
+
     switch (state) {
         case INIT:
             xprintf("I%u ", timer_read());