ibmpc_usb: Add protocol and isr_debug check
This commit is contained in:
parent
0cf9dfc888
commit
fcebf2215f
1 changed files with 13 additions and 0 deletions
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue