xprintf("I%u ", timer_read());
keyboard_kind = NONE;
keyboard_id = 0x0000;
+ current_protocol = 0;
matrix_clear();
clear_keyboard();
keyboard_kind = PC_AT;
}
- xprintf("\nID:%04X(%d) ", keyboard_id, keyboard_kind);
+ xprintf("\nID:%04X(%s) ", keyboard_id, KEYBOARD_KIND_STR(keyboard_kind));
state = SETUP;
break;
#define IBMPC_USB_H
typedef enum { NONE, PC_XT, PC_AT, PC_TERMINAL, PC_AT_Z150 } keyboard_kind_t;
+#define KEYBOARD_KIND_STR(kind) \
+ (kind == PC_XT ? "XT" : \
+ kind == PC_AT ? "AT" : \
+ kind == PC_TERMINAL ? "TERMINAL" : \
+ kind == PC_AT_Z150 ? "AT_Z150" : \
+ "NONE")
+
extern uint16_t keyboard_id;
extern keyboard_kind_t keyboard_kind;