]> git.friedersdorff.com Git - max/tmk_keyboard.git/commitdiff
ibmpc: Add debug code for isr_state
authortmk <hasu@tmk-kbd.com>
Tue, 12 May 2020 09:50:21 +0000 (18:50 +0900)
committertmk <hasu@tmk-kbd.com>
Tue, 12 May 2020 09:50:21 +0000 (18:50 +0900)
tmk_core/protocol/ibmpc.c

index 282a4f8260671aacf37f81e7c241af0e65440632..23aad3d37db79f65e7d19ca46cd19a323a07d9b7 100644 (file)
@@ -208,6 +208,7 @@ int16_t ibmpc_host_recv(void)
         }
     }
 
+    //dprintf("i%04X ", ibmpc_isr_debug); ibmpc_isr_debug = 0;
     dprintf("r%02X ", ret);
     return ret;
 }
@@ -315,6 +316,7 @@ ISR(IBMPC_INT_VECT)
                     goto NEXT;
                 } else {
                     // XT_Clone-done
+                    ibmpc_isr_debug = isr_state;
                     isr_state = isr_state>>8;
                     ibmpc_protocol = IBMPC_PROTOCOL_XT_CLONE;
                     goto DONE;
@@ -340,6 +342,7 @@ ISR(IBMPC_INT_VECT)
                     goto NEXT;
                 } else {
                     // no stop bit: XT_IBM-done
+                    ibmpc_isr_debug = isr_state;
                     isr_state = isr_state>>8;
                     ibmpc_protocol = IBMPC_PROTOCOL_XT_IBM;
                     goto DONE;
@@ -354,6 +357,7 @@ ISR(IBMPC_INT_VECT)
             // DO NOT check stop bit. Zenith Z-150(AT) asserts stop bit as low for no reason.
             // https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-AT-Keyboard-Protocol#zenith-z-150-beige
             // TODO: parity check?
+            ibmpc_isr_debug = isr_state;
             isr_state = isr_state>>6;
             ibmpc_protocol = IBMPC_PROTOCOL_AT;
             goto DONE;