ibmpc_usb: AT/XT Auto-Switching keyboard support

Prefer selecting AT protocool to XT
Send resend command 'FE' to keyboard that starts with 'AA' including parity error
https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-Keyboard-Converter#atxt-auto-switching
This commit is contained in:
tmk 2021-10-25 15:15:01 +09:00
parent eea8b36f0d
commit 16ff313820
2 changed files with 27 additions and 10 deletions

View file

@ -28,6 +28,10 @@ class IBMPCConverter {
}
void init(void) {
keyboard_id = 0x0000;
keyboard_kind = NONE;
current_protocol = 0;
matrix_clear();
ibmpc.host_init();
}
@ -64,6 +68,7 @@ class IBMPCConverter {
SETUP,
LOOP,
ERROR,
ERROR_PARITY_AA,
} state = INIT;
enum CS1_state {