From eb3d3b4c291d87dbc9935a1c9a6599ed57680724 Mon Sep 17 00:00:00 2001 From: tmk Date: Tue, 13 Jul 2021 12:46:42 +0900 Subject: [PATCH] lufa: Fix mouse Get/SetProtocol --- tmk_core/protocol/lufa/lufa.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index 7a5bd746..eaa32259 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -450,6 +450,7 @@ void EVENT_USB_Device_ControlRequest(void) print("[p]"); #endif } +#if defined(MOUSE_ENABLE) if (USB_ControlRequest.wIndex == MOUSE_INTERFACE) { Endpoint_ClearSETUP(); while (!(Endpoint_IsINReady())); @@ -457,6 +458,7 @@ void EVENT_USB_Device_ControlRequest(void) Endpoint_ClearIN(); Endpoint_ClearStatusStage(); } +#endif } break; @@ -473,6 +475,7 @@ void EVENT_USB_Device_ControlRequest(void) print("[P]"); #endif } +#if defined(MOUSE_ENABLE) if (USB_ControlRequest.wIndex == MOUSE_INTERFACE) { Endpoint_ClearSETUP(); Endpoint_ClearStatusStage(); @@ -480,6 +483,7 @@ void EVENT_USB_Device_ControlRequest(void) mouse_protocol = (USB_ControlRequest.wValue & 0xFF); clear_keyboard(); } +#endif } break;