aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tmk_core/protocol/lufa/lufa.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c
index 27cf51b16..cdabaf16e 100644
--- a/tmk_core/protocol/lufa/lufa.c
+++ b/tmk_core/protocol/lufa/lufa.c
@@ -517,17 +517,20 @@ void EVENT_USB_Device_ControlRequest(void)
517 if (USB_DeviceState == DEVICE_STATE_Unattached) 517 if (USB_DeviceState == DEVICE_STATE_Unattached)
518 return; 518 return;
519 } 519 }
520#ifdef KEYBOARD_SHARED_EP 520
521 uint8_t report_id = REPORT_ID_KEYBOARD; 521 if (Endpoint_BytesInEndpoint() == 2) {
522 if (keyboard_protocol) { 522 uint8_t report_id = REPORT_ID_KEYBOARD;
523 report_id = Endpoint_Read_8(); 523
524 } 524 if (keyboard_protocol) {
525 if (report_id == REPORT_ID_KEYBOARD || report_id == REPORT_ID_NKRO) { 525 report_id = Endpoint_Read_8();
526 }
527
528 if (report_id == REPORT_ID_KEYBOARD || report_id == REPORT_ID_NKRO) {
526 keyboard_led_stats = Endpoint_Read_8(); 529 keyboard_led_stats = Endpoint_Read_8();
530 }
531 } else {
532 keyboard_led_stats = Endpoint_Read_8();
527 } 533 }
528#else
529 keyboard_led_stats = Endpoint_Read_8();
530#endif
531 534
532 Endpoint_ClearOUT(); 535 Endpoint_ClearOUT();
533 Endpoint_ClearStatusStage(); 536 Endpoint_ClearStatusStage();