]> git.friedersdorff.com Git - max/tmk_keyboard.git/commitdiff
ibmpc: Add ibmpc_isr_debug to see isr_state
authortmk <hasu@tmk-kbd.com>
Mon, 11 May 2020 04:22:06 +0000 (13:22 +0900)
committertmk <hasu@tmk-kbd.com>
Mon, 11 May 2020 07:12:36 +0000 (16:12 +0900)
tmk_core/protocol/ibmpc.c
tmk_core/protocol/ibmpc.h

index 2c9e121312b16c77de69525ea0d50d6e89e4c0f1..0e3998aae6a846e5e512e078f70ecb609436cdd2 100644 (file)
@@ -56,6 +56,7 @@ POSSIBILITY OF SUCH DAMAGE.
 } while (0)
 
 
+volatile uint16_t ibmpc_isr_debug = 0;
 volatile uint8_t ibmpc_protocol = IBMPC_PROTOCOL_NO;
 volatile uint8_t ibmpc_error = IBMPC_ERR_NONE;
 
@@ -286,6 +287,7 @@ ISR(IBMPC_INT_VECT)
             break;
         case 0b11100000:
             // XT_IBM-error-done
+            ibmpc_isr_debug = isr_state;
             isr_state = isr_state>>8;
             ibmpc_protocol = IBMPC_PROTOCOL_XT_ERROR;
             goto DONE;
@@ -327,12 +329,14 @@ ISR(IBMPC_INT_VECT)
         case 0b11110000:
         default:            // xxxx_oooo(any 1 in low nibble)
             // Illegal
+            ibmpc_isr_debug = isr_state;
             ibmpc_error = IBMPC_ERR_ILLEGAL;
             goto ERROR;
             break;
     }
 
 ERROR:
+    ibmpc_isr_debug = isr_state;
     isr_state = 0x8000;
     recv_data = 0xFF00; // clear data and scancode of error 0x00
     return;
index cb7534061408b876b4aaf7b50a5715c74ed030fa..7c8ea84aa88454194eb0bed65c0520d90b20faf8 100644 (file)
@@ -90,6 +90,7 @@ POSSIBILITY OF SUCH DAMAGE.
 #define IBMPC_LED_CAPS_LOCK   2
 
 
+extern volatile uint16_t ibmpc_isr_debug;
 extern volatile uint8_t ibmpc_protocol;
 extern volatile uint8_t ibmpc_error;