diff options
author | tmk <hasu@tmk-kbd.com> | 2015-09-20 14:34:13 +0900 |
---|---|---|
committer | tmk <hasu@tmk-kbd.com> | 2015-09-20 14:34:13 +0900 |
commit | ed9766a7d44cd727dbd59008eff4258745ff87cf (patch) | |
tree | 27c19156051b82a3b558e2f234799d57e205a671 /tmk_core/protocol | |
parent | e8a4a63ec45cf5052d8a054182ab83fdbafc3ff6 (diff) |
core: Fix for disabling NKRO in Boot protocol
Diffstat (limited to 'tmk_core/protocol')
-rw-r--r-- | tmk_core/protocol/lufa/lufa.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index 188fb7b89b..345630aa90 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -53,6 +53,7 @@ #include "lufa.h" uint8_t keyboard_idle = 0; +/* 0: Boot Protocol, 1: Report Protocol(default) */ uint8_t keyboard_protocol = 1; static uint8_t keyboard_led_stats = 0; @@ -349,10 +350,7 @@ void EVENT_USB_Device_ControlRequest(void) Endpoint_ClearSETUP(); Endpoint_ClearStatusStage(); - keyboard_protocol = ((USB_ControlRequest.wValue & 0xFF) != 0x00); -#ifdef NKRO_ENABLE - keyboard_nkro = !!keyboard_protocol; -#endif + keyboard_protocol = (USB_ControlRequest.wValue & 0xFF); clear_keyboard(); } } @@ -399,7 +397,7 @@ static void send_keyboard(report_keyboard_t *report) /* Select the Keyboard Report Endpoint */ #ifdef NKRO_ENABLE - if (keyboard_nkro) { + if (keyboard_protocol && keyboard_nkro) { /* Report protocol - NKRO */ Endpoint_SelectEndpoint(NKRO_IN_EPNUM); |