ibmpc: Fix how to initialize keyboard
This commit is contained in:
parent
f68a1f5590
commit
7587fe3382
1 changed files with 3 additions and 4 deletions
|
|
@ -78,10 +78,6 @@ static uint16_t read_keyboard_id(void)
|
||||||
void matrix_init(void)
|
void matrix_init(void)
|
||||||
{
|
{
|
||||||
debug_enable = true;
|
debug_enable = true;
|
||||||
ibmpc_host_init();
|
|
||||||
|
|
||||||
// hard reset for XT keyboard
|
|
||||||
IBMPC_RESET();
|
|
||||||
|
|
||||||
// initialize matrix state: all keys off
|
// initialize matrix state: all keys off
|
||||||
for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00;
|
for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00;
|
||||||
|
|
@ -138,6 +134,9 @@ uint8_t matrix_scan(void)
|
||||||
keyboard_id = 0x0000;
|
keyboard_id = 0x0000;
|
||||||
last_time = timer_read();
|
last_time = timer_read();
|
||||||
state = WAIT_STARTUP;
|
state = WAIT_STARTUP;
|
||||||
|
|
||||||
|
ibmpc_host_init();
|
||||||
|
IBMPC_RESET(); // hard reset for some old XT keyboards
|
||||||
matrix_clear();
|
matrix_clear();
|
||||||
clear_keyboard();
|
clear_keyboard();
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue