From 41ccca96b70b99c5a5e8f700d0cf708ddf54ef95 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Wed, 13 Oct 2021 20:26:15 -0400 Subject: [PATCH] add more cases for KEYBOARD_SHARED_EP --- tmk_core/protocol/chibios/usb_main.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c index 71f112ce17..002e7d23d4 100644 --- a/tmk_core/protocol/chibios/usb_main.c +++ b/tmk_core/protocol/chibios/usb_main.c @@ -569,12 +569,12 @@ static bool usb_request_hook_cb(USBDriver *usbp) { switch (usbp->setup[1]) { /* bRequest */ case HID_GET_REPORT: switch (usbp->setup[4]) { /* LSB(wIndex) (check MSB==0?) */ +#ifndef KEYBOARD_SHARED_EP case KEYBOARD_INTERFACE: - usbSetupTransfer(usbp, (uint8_t *)&keyboard_report_sent, sizeof(keyboard_report_sent), NULL); return TRUE; break; - +#endif #if defined(MOUSE_ENABLE) && !defined(MOUSE_SHARED_EP) case MOUSE_INTERFACE: usbSetupTransfer(usbp, (uint8_t *)&mouse_report_blank, sizeof(mouse_report_blank), NULL); @@ -594,8 +594,13 @@ static bool usb_request_hook_cb(USBDriver *usbp) { return TRUE; break; #endif +#if defined(KEYBOARD_SHARED_EP) || defined(NKRO_ENABLE) +#ifdef KEYBOARD_SHARED_EP + case REPORT_ID_KEYBOARD: +#endif #ifdef NKRO_ENABLE case REPORT_ID_NKRO: +#endif usbSetupTransfer(usbp, (uint8_t *)&keyboard_report_sent, sizeof(keyboard_report_sent), NULL); return TRUE; break;