forked from mirrors/qmk_userspace
Quick Fix: read scan code from PC98
This commit is contained in:
parent
f68c5bf0d3
commit
eb776c1b79
3 changed files with 46 additions and 11 deletions
|
@ -73,6 +73,8 @@ void matrix_init(void)
|
|||
PC98_RDY_PORT |= (1<<PC98_RDY_BIT);
|
||||
PC98_RTY_PORT |= (1<<PC98_RTY_BIT);
|
||||
|
||||
DDRD |= 1<<7;
|
||||
|
||||
|
||||
serial_init();
|
||||
|
||||
|
@ -83,6 +85,9 @@ void matrix_init(void)
|
|||
_delay_us(13);
|
||||
PC98_RDY_PORT |= (1<<PC98_RDY_BIT);
|
||||
|
||||
// PC98 ready
|
||||
PC98_RDY_PORT &= ~(1<<PC98_RDY_BIT);
|
||||
|
||||
// initialize matrix state: all keys off
|
||||
for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00;
|
||||
|
||||
|
@ -96,6 +101,7 @@ uint8_t matrix_scan(void)
|
|||
|
||||
uint8_t code;
|
||||
PC98_RDY_PORT |= (1<<PC98_RDY_BIT);
|
||||
_delay_us(30);
|
||||
code = serial_recv();
|
||||
PC98_RDY_PORT &= ~(1<<PC98_RDY_BIT);
|
||||
if (!code) return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue