diff options
Diffstat (limited to 'protocol')
| -rw-r--r-- | protocol/lufa/lufa.c | 5 | ||||
| -rw-r--r-- | protocol/pjrc/usb.c | 3 | ||||
| -rw-r--r-- | protocol/pjrc/usb_keyboard.c | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/protocol/lufa/lufa.c b/protocol/lufa/lufa.c index a43a552a8..db05702aa 100644 --- a/protocol/lufa/lufa.c +++ b/protocol/lufa/lufa.c | |||
| @@ -308,6 +308,9 @@ void EVENT_USB_Device_ControlRequest(void) | |||
| 308 | Endpoint_ClearStatusStage(); | 308 | Endpoint_ClearStatusStage(); |
| 309 | 309 | ||
| 310 | keyboard_protocol = ((USB_ControlRequest.wValue & 0xFF) != 0x00); | 310 | keyboard_protocol = ((USB_ControlRequest.wValue & 0xFF) != 0x00); |
| 311 | #ifdef NKRO_ENABLE | ||
| 312 | keyboard_nkro = !!keyboard_protocol; | ||
| 313 | #endif | ||
| 311 | clear_keyboard(); | 314 | clear_keyboard(); |
| 312 | } | 315 | } |
| 313 | } | 316 | } |
| @@ -354,7 +357,7 @@ static void send_keyboard(report_keyboard_t *report) | |||
| 354 | 357 | ||
| 355 | /* Select the Keyboard Report Endpoint */ | 358 | /* Select the Keyboard Report Endpoint */ |
| 356 | #ifdef NKRO_ENABLE | 359 | #ifdef NKRO_ENABLE |
| 357 | if (keyboard_nkro && keyboard_protocol) { | 360 | if (keyboard_nkro) { |
| 358 | /* Report protocol - NKRO */ | 361 | /* Report protocol - NKRO */ |
| 359 | Endpoint_SelectEndpoint(NKRO_IN_EPNUM); | 362 | Endpoint_SelectEndpoint(NKRO_IN_EPNUM); |
| 360 | 363 | ||
diff --git a/protocol/pjrc/usb.c b/protocol/pjrc/usb.c index b09ad3f23..2b267d480 100644 --- a/protocol/pjrc/usb.c +++ b/protocol/pjrc/usb.c | |||
| @@ -930,6 +930,9 @@ ISR(USB_COM_vect) | |||
| 930 | } | 930 | } |
| 931 | if (bRequest == HID_SET_PROTOCOL) { | 931 | if (bRequest == HID_SET_PROTOCOL) { |
| 932 | keyboard_protocol = wValue; | 932 | keyboard_protocol = wValue; |
| 933 | #ifdef NKRO_ENABLE | ||
| 934 | keyboard_nkro = !!keyboard_protocol; | ||
| 935 | #endif | ||
| 933 | clear_keyboard(); | 936 | clear_keyboard(); |
| 934 | //usb_wait_in_ready(); | 937 | //usb_wait_in_ready(); |
| 935 | usb_send_in(); | 938 | usb_send_in(); |
diff --git a/protocol/pjrc/usb_keyboard.c b/protocol/pjrc/usb_keyboard.c index c11995db6..d16833187 100644 --- a/protocol/pjrc/usb_keyboard.c +++ b/protocol/pjrc/usb_keyboard.c | |||
| @@ -56,7 +56,7 @@ int8_t usb_keyboard_send_report(report_keyboard_t *report) | |||
| 56 | int8_t result = 0; | 56 | int8_t result = 0; |
| 57 | 57 | ||
| 58 | #ifdef NKRO_ENABLE | 58 | #ifdef NKRO_ENABLE |
| 59 | if (keyboard_nkro && keyboard_protocol) | 59 | if (keyboard_nkro) |
| 60 | result = send_report(report, KBD2_ENDPOINT, 0, KBD2_SIZE); | 60 | result = send_report(report, KBD2_ENDPOINT, 0, KBD2_SIZE); |
| 61 | else | 61 | else |
| 62 | #endif | 62 | #endif |
