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/lufa/lufa.c | |
| parent | e8a4a63ec45cf5052d8a054182ab83fdbafc3ff6 (diff) | |
| download | qmk_firmware-ed9766a7d44cd727dbd59008eff4258745ff87cf.tar.gz qmk_firmware-ed9766a7d44cd727dbd59008eff4258745ff87cf.zip | |
core: Fix for disabling NKRO in Boot protocol
Diffstat (limited to 'tmk_core/protocol/lufa/lufa.c')
| -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 188fb7b89..345630aa9 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c | |||
| @@ -53,6 +53,7 @@ | |||
| 53 | #include "lufa.h" | 53 | #include "lufa.h" |
| 54 | 54 | ||
| 55 | uint8_t keyboard_idle = 0; | 55 | uint8_t keyboard_idle = 0; |
| 56 | /* 0: Boot Protocol, 1: Report Protocol(default) */ | ||
| 56 | uint8_t keyboard_protocol = 1; | 57 | uint8_t keyboard_protocol = 1; |
| 57 | static uint8_t keyboard_led_stats = 0; | 58 | static uint8_t keyboard_led_stats = 0; |
| 58 | 59 | ||
| @@ -349,10 +350,7 @@ void EVENT_USB_Device_ControlRequest(void) | |||
| 349 | Endpoint_ClearSETUP(); | 350 | Endpoint_ClearSETUP(); |
| 350 | Endpoint_ClearStatusStage(); | 351 | Endpoint_ClearStatusStage(); |
| 351 | 352 | ||
| 352 | keyboard_protocol = ((USB_ControlRequest.wValue & 0xFF) != 0x00); | 353 | keyboard_protocol = (USB_ControlRequest.wValue & 0xFF); |
| 353 | #ifdef NKRO_ENABLE | ||
| 354 | keyboard_nkro = !!keyboard_protocol; | ||
| 355 | #endif | ||
| 356 | clear_keyboard(); | 354 | clear_keyboard(); |
| 357 | } | 355 | } |
| 358 | } | 356 | } |
| @@ -399,7 +397,7 @@ static void send_keyboard(report_keyboard_t *report) | |||
| 399 | 397 | ||
| 400 | /* Select the Keyboard Report Endpoint */ | 398 | /* Select the Keyboard Report Endpoint */ |
| 401 | #ifdef NKRO_ENABLE | 399 | #ifdef NKRO_ENABLE |
| 402 | if (keyboard_nkro) { | 400 | if (keyboard_protocol && keyboard_nkro) { |
| 403 | /* Report protocol - NKRO */ | 401 | /* Report protocol - NKRO */ |
| 404 | Endpoint_SelectEndpoint(NKRO_IN_EPNUM); | 402 | Endpoint_SelectEndpoint(NKRO_IN_EPNUM); |
| 405 | 403 | ||
