From 5e3f2d2b2e5065a04495f2c55fae0849966b5d23 Mon Sep 17 00:00:00 2001 From: tmk Date: Fri, 25 Apr 2014 15:32:21 +0900 Subject: Make NKRO deafult when it is available - NKRO is used only when keyboard_protocol = 1(report) --- protocol/pjrc/usb_keyboard.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'protocol/pjrc/usb_keyboard.c') diff --git a/protocol/pjrc/usb_keyboard.c b/protocol/pjrc/usb_keyboard.c index de798fcc22..c11995db6f 100644 --- a/protocol/pjrc/usb_keyboard.c +++ b/protocol/pjrc/usb_keyboard.c @@ -34,12 +34,12 @@ // protocol setting from the host. We use exactly the same report // either way, so this variable only stores the setting since we // are required to be able to report which setting is in use. -uint8_t usb_keyboard_protocol=1; +uint8_t keyboard_protocol=1; // the idle configuration, how often we send the report to the // host (ms * 4) even when it hasn't changed // Windows and Linux set 0 while OS X sets 6(24ms) by SET_IDLE request. -uint8_t usb_keyboard_idle_config=125; +uint8_t keyobard_idle=125; // count until idle timeout uint8_t usb_keyboard_idle_count=0; @@ -56,15 +56,12 @@ int8_t usb_keyboard_send_report(report_keyboard_t *report) int8_t result = 0; #ifdef NKRO_ENABLE - if (keyboard_nkro) + if (keyboard_nkro && keyboard_protocol) result = send_report(report, KBD2_ENDPOINT, 0, KBD2_SIZE); else #endif { - if (usb_keyboard_protocol) - result = send_report(report, KBD_ENDPOINT, 0, KBD_SIZE); - else - result = send_report(report, KBD_ENDPOINT, 0, 6); + result = send_report(report, KBD_ENDPOINT, 0, KBD_SIZE); } if (result) return result; -- cgit v1.2.3