diff options
author | tmk <nobody@nowhere> | 2014-04-25 15:32:21 +0900 |
---|---|---|
committer | tmk <nobody@nowhere> | 2014-04-27 04:16:49 +0900 |
commit | 5e3f2d2b2e5065a04495f2c55fae0849966b5d23 (patch) | |
tree | 4e224b2a2d6a6445ae489ab0b1c150cc3c4a83e4 /common | |
parent | 62117e7ea77bf036e4e08bb02d682311e3c3d401 (diff) | |
download | qmk_firmware-5e3f2d2b2e5065a04495f2c55fae0849966b5d23.tar.gz |
Make NKRO deafult when it is available
- NKRO is used only when keyboard_protocol = 1(report)
Diffstat (limited to 'common')
-rw-r--r-- | common/action_util.c | 6 | ||||
-rw-r--r-- | common/command.c | 4 | ||||
-rw-r--r-- | common/host.c | 2 | ||||
-rw-r--r-- | common/host.h | 3 |
4 files changed, 9 insertions, 6 deletions
diff --git a/common/action_util.c b/common/action_util.c index 99a3adaab..ebe7150dc 100644 --- a/common/action_util.c +++ b/common/action_util.c @@ -67,7 +67,7 @@ void send_keyboard_report(void) { void add_key(uint8_t key) { #ifdef NKRO_ENABLE - if (keyboard_nkro) { + if (keyboard_nkro && keyboard_protocol) { add_key_bit(key); return; } @@ -78,7 +78,7 @@ void add_key(uint8_t key) void del_key(uint8_t key) { #ifdef NKRO_ENABLE - if (keyboard_nkro) { + if (keyboard_nkro && keyboard_protocol) { del_key_bit(key); return; } @@ -151,7 +151,7 @@ uint8_t has_anymod(void) uint8_t get_first_key(void) { #ifdef NKRO_ENABLE - if (keyboard_nkro) { + if (keyboard_nkro && keyboard_protocol) { uint8_t i = 0; for (; i < REPORT_BITS && !keyboard_report->nkro.bits[i]; i++) ; diff --git a/common/command.c b/common/command.c index f6f276951..d2f8eb832 100644 --- a/common/command.c +++ b/common/command.c @@ -301,13 +301,13 @@ static bool command_common(uint8_t code) case KC_S: print("\n\n----- Status -----\n"); print_val_hex8(host_keyboard_leds()); + print_val_hex8(keyboard_protocol); + print_val_hex8(keyboard_idle); #ifdef PROTOCOL_PJRC print_val_hex8(UDCON); print_val_hex8(UDIEN); print_val_hex8(UDINT); print_val_hex8(usb_keyboard_leds); - print_val_hex8(usb_keyboard_protocol); - print_val_hex8(usb_keyboard_idle_config); print_val_hex8(usb_keyboard_idle_count); #endif diff --git a/common/host.c b/common/host.c index 1eafef75c..2e56971bd 100644 --- a/common/host.c +++ b/common/host.c @@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #ifdef NKRO_ENABLE -bool keyboard_nkro = false; +bool keyboard_nkro = true; #endif static host_driver_t *driver; diff --git a/common/host.h b/common/host.h index 8ff262985..a56e6c3b0 100644 --- a/common/host.h +++ b/common/host.h @@ -32,6 +32,9 @@ extern "C" { extern bool keyboard_nkro; #endif +uint8_t keyboard_idle; +uint8_t keyboard_protocol; + /* host driver */ void host_set_driver(host_driver_t *driver); |