1
0
Fork 0

Migrate and remove deprecated debug utils (#22961)

This commit is contained in:
Joel Challis 2024-01-26 16:32:06 +00:00 committed by GitHub
parent 728aa576b0
commit a632593769
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 26 additions and 127 deletions

View file

@ -87,23 +87,23 @@ uint8_t matrix_scan(void)
uint8_t code;
if ((code = ps2_host_recv())) {
debug("r"); debug_hex(code); debug(" ");
dprintf("r%02X ", code);
}
switch (state) {
case RESET:
debug("wFF ");
dprint("wFF ");
if (ps2_host_send(0xFF) == 0xFA) {
debug("[ack]\nRESET_RESPONSE: ");
dprint("[ack]\nRESET_RESPONSE: ");
state = RESET_RESPONSE;
}
break;
case RESET_RESPONSE:
if (code == 0xAA) {
debug("[ok]\nKBD_ID: ");
dprint("[ok]\nKBD_ID: ");
state = KBD_ID0;
} else if (code) {
debug("err\nRESET: ");
dprint("err\nRESET: ");
state = RESET;
}
break;
@ -115,14 +115,14 @@ uint8_t matrix_scan(void)
break;
case KBD_ID1:
if (code) {
debug("\nCONFIG: ");
dprint("\nCONFIG: ");
state = CONFIG;
}
break;
case CONFIG:
debug("wF8 ");
dprint("wF8 ");
if (ps2_host_send(0xF8) == 0xFA) {
debug("[ack]\nREADY\n");
dprint("[ack]\nREADY\n");
state = READY;
}
break;
@ -132,16 +132,16 @@ uint8_t matrix_scan(void)
break;
case 0xF0:
state = F0_BREAK;
debug(" ");
dprint(" ");
break;
default: // normal key make
if (code < 0x88) {
matrix_make(code);
} else {
debug("unexpected scan code at READY: "); debug_hex(code); debug("\n");
dprintf("unexpected scan code at READY: %02X\n", code);
}
state = READY;
debug("\n");
dprint("\n");
}
break;
case F0_BREAK: // Break code
@ -152,10 +152,10 @@ uint8_t matrix_scan(void)
if (code < 0x88) {
matrix_break(code);
} else {
debug("unexpected scan code at F0: "); debug_hex(code); debug("\n");
dprintf("unexpected scan code at F0: %02X\n", code);
}
state = READY;
debug("\n");
dprint("\n");
}
break;
}