static void matrix_make(uint8_t code);
static void matrix_break(uint8_t code);
-static void matrix_clear(void);
/*
static void enable_break(void)
{
print("Enable break: ");
+ while (ibm4704_send(0xFC)) { _delay_ms(10); }
// valid scancode: 00-79h
- for (uint8_t code = 0; code < 0x7A; code++) {
+ for (uint8_t code = 0; code < 0x7F; code++) {
while (ibm4704_send(0x80|code)) _delay_ms(10);
_delay_ms(5); // wait for response
// No response(FF) when ok, FD when out of bound
if (code==0xFF) {
// Not receivd
return 0;
- } else if ((code&0x7F) >= 0x7A) {
- // 0xFF-FA and 0x7F-7A is not scancode
+ } else if ((code&0x7F) >= 0x7C) {
+ // 0xFF-FC and 0x7F-7C is not scancode
xprintf("Error: %02X\n", code);
matrix_clear();
return 0;
matrix[ROW(code)] &= ~(1<<COL(code));
}
-inline
-static void matrix_clear(void)
+void matrix_clear(void)
{
for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00;
}