From 8e390f92a2dd2226b3351c5b6319b60e2ff0f4e3 Mon Sep 17 00:00:00 2001 From: lokher Date: Tue, 18 Jun 2024 10:40:17 +0800 Subject: [PATCH] Reset HID report mode on USB_EVENT_RESET event --- tmk_core/protocol/chibios/usb_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c index aa1aa03ec7..c57efc344a 100644 --- a/tmk_core/protocol/chibios/usb_main.c +++ b/tmk_core/protocol/chibios/usb_main.c @@ -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]); }