aboutsummaryrefslogtreecommitdiffstats
path: root/protocol
diff options
context:
space:
mode:
authorGravatar tmk <nobody@nowhere>2014-04-27 05:07:27 +0900
committerGravatar tmk <nobody@nowhere>2014-04-27 05:36:41 +0900
commit22854eb71b84a10ebad0f85841f2b99d38e1da8c (patch)
tree16ede150938a420cf05bcb7769b73df4794b0f9f /protocol
parent5e3f2d2b2e5065a04495f2c55fae0849966b5d23 (diff)
downloadqmk_firmware-22854eb71b84a10ebad0f85841f2b99d38e1da8c.tar.gz
NKRO is disable when SET_PROTOCOL(boot)
- Command can force to enable NKRO even when boot mode - After boot keyboard may be in boot mode due to BIOS' request
Diffstat (limited to 'protocol')
-rw-r--r--protocol/lufa/lufa.c5
-rw-r--r--protocol/pjrc/usb.c3
-rw-r--r--protocol/pjrc/usb_keyboard.c2
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)
Endpoint_ClearStatusStage();
keyboard_protocol = ((USB_ControlRequest.wValue & 0xFF) != 0x00);
+#ifdef NKRO_ENABLE
+ keyboard_nkro = !!keyboard_protocol;
+#endif
clear_keyboard();
}
}
@@ -354,7 +357,7 @@ static void send_keyboard(report_keyboard_t *report)
/* Select the Keyboard Report Endpoint */
#ifdef NKRO_ENABLE
- if (keyboard_nkro && keyboard_protocol) {
+ if (keyboard_nkro) {
/* Report protocol - NKRO */
Endpoint_SelectEndpoint(NKRO_IN_EPNUM);
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)
}
if (bRequest == HID_SET_PROTOCOL) {
keyboard_protocol = wValue;
+#ifdef NKRO_ENABLE
+ keyboard_nkro = !!keyboard_protocol;
+#endif
clear_keyboard();
//usb_wait_in_ready();
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)
int8_t result = 0;
#ifdef NKRO_ENABLE
- if (keyboard_nkro && keyboard_protocol)
+ if (keyboard_nkro)
result = send_report(report, KBD2_ENDPOINT, 0, KBD2_SIZE);
else
#endif