diff options
Diffstat (limited to 'tmk_core/protocol/lufa')
| -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 | ||
