Reset HID report mode on USB_EVENT_RESET event

This commit is contained in:
lokher 2024-06-18 10:40:17 +08:00
parent 7fbf1e2af2
commit 8e390f92a2

View File

@ -203,6 +203,7 @@ static void usb_event_cb(USBDriver *usbp, usbevent_t event) {
case USB_EVENT_RESET:
usb_event_queue_enqueue(event);
chSysLockFromISR();
if (event == USB_EVENT_RESET) keyboard_protocol = 1;
for (int i = 0; i < USB_ENDPOINT_IN_COUNT; i++) {
usb_endpoint_in_suspend_cb(&usb_endpoints_in[i]);
}