From 0cf9dfc888755e18a88f71f40863e3dc035ab91a Mon Sep 17 00:00:00 2001 From: tmk Date: Mon, 11 May 2020 13:22:06 +0900 Subject: [PATCH] ibmpc: Add ibmpc_isr_debug to see isr_state --- tmk_core/protocol/ibmpc.c | 4 ++++ tmk_core/protocol/ibmpc.h | 1 + 2 files changed, 5 insertions(+) diff --git a/tmk_core/protocol/ibmpc.c b/tmk_core/protocol/ibmpc.c index 2c9e1213..0e3998aa 100644 --- a/tmk_core/protocol/ibmpc.c +++ b/tmk_core/protocol/ibmpc.c @@ -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; diff --git a/tmk_core/protocol/ibmpc.h b/tmk_core/protocol/ibmpc.h index cb753406..7c8ea84a 100644 --- a/tmk_core/protocol/ibmpc.h +++ b/tmk_core/protocol/ibmpc.h @@ -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; -- 2.46.2