diff options
| -rw-r--r-- | docs/config_options.md | 2 | ||||
| -rw-r--r-- | keyboards/hotdox/rules.mk | 1 | ||||
| -rw-r--r-- | keyboards/ktec/ergodone/rules.mk | 1 | ||||
| -rw-r--r-- | keyboards/planck/keymaps/not-quite-neo/rules.mk | 4 | ||||
| -rw-r--r-- | keyboards/planck/keymaps/zach/rules.mk | 6 | ||||
| -rw-r--r-- | keyboards/preonic/keymaps/zach/rules.mk | 6 | ||||
| -rw-r--r-- | quantum/action_util.c | 10 | ||||
| -rw-r--r-- | show_options.mk | 2 | ||||
| -rw-r--r-- | tests/test_common/keyboard_report_util.cpp | 2 | ||||
| -rw-r--r-- | tmk_core/common.mk | 4 | ||||
| -rw-r--r-- | tmk_core/common/report.c | 16 |
11 files changed, 24 insertions, 30 deletions
diff --git a/docs/config_options.md b/docs/config_options.md index 7584d3584..dbf3d3da2 100644 --- a/docs/config_options.md +++ b/docs/config_options.md | |||
| @@ -418,6 +418,8 @@ Use these to enable or disable building certain features. The more you have enab | |||
| 418 | * Key combo feature | 418 | * Key combo feature |
| 419 | * `NKRO_ENABLE` | 419 | * `NKRO_ENABLE` |
| 420 | * USB N-Key Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | 420 | * USB N-Key Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work |
| 421 | * `RING_BUFFERED_6KRO_REPORT_ENABLE` | ||
| 422 | * USB 6-Key Rollover - Instead of stopping any new input once 6 keys are pressed, the oldest key is released and the new key is pressed. | ||
| 421 | * `AUDIO_ENABLE` | 423 | * `AUDIO_ENABLE` |
| 422 | * Enable the audio subsystem. | 424 | * Enable the audio subsystem. |
| 423 | * `KEY_OVERRIDE_ENABLE` | 425 | * `KEY_OVERRIDE_ENABLE` |
diff --git a/keyboards/hotdox/rules.mk b/keyboards/hotdox/rules.mk index 3802dbe99..6caa17fab 100644 --- a/keyboards/hotdox/rules.mk +++ b/keyboards/hotdox/rules.mk | |||
| @@ -16,7 +16,6 @@ CONSOLE_ENABLE = yes # Console for debug | |||
| 16 | COMMAND_ENABLE = no # Commands for debug and configuration | 16 | COMMAND_ENABLE = no # Commands for debug and configuration |
| 17 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | 17 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend |
| 18 | NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA | 18 | NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA |
| 19 | USB_6KRO_ENABLE = no # USB 6key Rollover | ||
| 20 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality | 19 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality |
| 21 | SWAP_HANDS_ENABLE = no # Disable Onehand | 20 | SWAP_HANDS_ENABLE = no # Disable Onehand |
| 22 | RGBLIGHT_ENABLE = no | 21 | RGBLIGHT_ENABLE = no |
diff --git a/keyboards/ktec/ergodone/rules.mk b/keyboards/ktec/ergodone/rules.mk index 3c1723a3c..f0478eb3a 100644 --- a/keyboards/ktec/ergodone/rules.mk +++ b/keyboards/ktec/ergodone/rules.mk | |||
| @@ -16,7 +16,6 @@ CONSOLE_ENABLE = no # Console for debug | |||
| 16 | COMMAND_ENABLE = no # Commands for debug and configuration | 16 | COMMAND_ENABLE = no # Commands for debug and configuration |
| 17 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | 17 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend |
| 18 | NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA | 18 | NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA |
| 19 | USB_6KRO_ENABLE = no # USB 6key Rollover | ||
| 20 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | 19 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality |
| 21 | SWAP_HANDS_ENABLE = no # Disable Onehand | 20 | SWAP_HANDS_ENABLE = no # Disable Onehand |
| 22 | RGBLIGHT_ENABLE = no | 21 | RGBLIGHT_ENABLE = no |
diff --git a/keyboards/planck/keymaps/not-quite-neo/rules.mk b/keyboards/planck/keymaps/not-quite-neo/rules.mk index b30c3a21e..b4e2e5c81 100644 --- a/keyboards/planck/keymaps/not-quite-neo/rules.mk +++ b/keyboards/planck/keymaps/not-quite-neo/rules.mk | |||
| @@ -12,7 +12,6 @@ EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | |||
| 12 | CONSOLE_ENABLE = no # Console for debug(+400) | 12 | CONSOLE_ENABLE = no # Console for debug(+400) |
| 13 | COMMAND_ENABLE = no # Commands for debug and configuration | 13 | COMMAND_ENABLE = no # Commands for debug and configuration |
| 14 | NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | 14 | NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work |
| 15 | USB_6KRO_ENABLE = no # 6key Rollover | ||
| 16 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | 15 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality |
| 17 | MIDI_ENABLE = no # MIDI controls | 16 | MIDI_ENABLE = no # MIDI controls |
| 18 | AUDIO_ENABLE = no # Audio output on port C6 | 17 | AUDIO_ENABLE = no # Audio output on port C6 |
| @@ -20,7 +19,6 @@ AUDIO_ENABLE = no # Audio output on port C6 | |||
| 20 | UNICODE_ENABLE = no # Unicode (can't be used with unicodemap) | 19 | UNICODE_ENABLE = no # Unicode (can't be used with unicodemap) |
| 21 | UNICODEMAP_ENABLE = no # Enable extended unicode | 20 | UNICODEMAP_ENABLE = no # Enable extended unicode |
| 22 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | 21 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID |
| 23 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. | 22 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. |
| 24 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | 23 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE |
| 25 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | 24 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend |
| 26 | |||
diff --git a/keyboards/planck/keymaps/zach/rules.mk b/keyboards/planck/keymaps/zach/rules.mk index 3247aece2..544e10a45 100644 --- a/keyboards/planck/keymaps/zach/rules.mk +++ b/keyboards/planck/keymaps/zach/rules.mk | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | # Max .hex size is about 28636 bytes | 2 | # Max .hex size is about 28636 bytes |
| 3 | 3 | ||
| 4 | # Build Options | 4 | # Build Options |
| 5 | # change to "no" to disable the options, or define them in the Makefile in | 5 | # change to "no" to disable the options, or define them in the Makefile in |
| 6 | # the appropriate keymap folder that will get included automatically | 6 | # the appropriate keymap folder that will get included automatically |
| 7 | # | 7 | # |
| 8 | TAP_DANCE_ENABLE = yes # Enable TapDance functionality | 8 | TAP_DANCE_ENABLE = yes # Enable TapDance functionality |
| @@ -12,7 +12,6 @@ EXTRAKEY_ENABLE = no # Audio control and System control(+450) | |||
| 12 | CONSOLE_ENABLE = no # Console for debug(+400) | 12 | CONSOLE_ENABLE = no # Console for debug(+400) |
| 13 | COMMAND_ENABLE = no # Commands for debug and configuration | 13 | COMMAND_ENABLE = no # Commands for debug and configuration |
| 14 | NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | 14 | NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work |
| 15 | USB_6KRO_ENABLE = no # 6key Rollover | ||
| 16 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | 15 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality |
| 17 | MIDI_ENABLE = no # MIDI controls | 16 | MIDI_ENABLE = no # MIDI controls |
| 18 | AUDIO_ENABLE = no # Audio output on port C6 | 17 | AUDIO_ENABLE = no # Audio output on port C6 |
| @@ -20,7 +19,6 @@ AUDIO_ENABLE = no # Audio output on port C6 | |||
| 20 | UNICODE_ENABLE = no # Unicode (can't be used with unicodemap) | 19 | UNICODE_ENABLE = no # Unicode (can't be used with unicodemap) |
| 21 | UNICODEMAP_ENABLE = yes # Enable extended unicode | 20 | UNICODEMAP_ENABLE = yes # Enable extended unicode |
| 22 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | 21 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID |
| 23 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. | 22 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. |
| 24 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | 23 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE |
| 25 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | 24 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend |
| 26 | |||
diff --git a/keyboards/preonic/keymaps/zach/rules.mk b/keyboards/preonic/keymaps/zach/rules.mk index 8d2f75eea..8cd4f98ee 100644 --- a/keyboards/preonic/keymaps/zach/rules.mk +++ b/keyboards/preonic/keymaps/zach/rules.mk | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | # Max .hex size is about 28636 bytes | 2 | # Max .hex size is about 28636 bytes |
| 3 | 3 | ||
| 4 | # Build Options | 4 | # Build Options |
| 5 | # change to "no" to disable the options, or define them in the Makefile in | 5 | # change to "no" to disable the options, or define them in the Makefile in |
| 6 | # the appropriate keymap folder that will get included automatically | 6 | # the appropriate keymap folder that will get included automatically |
| 7 | # | 7 | # |
| 8 | TAP_DANCE_ENABLE = yes # Enable TapDance functionality | 8 | TAP_DANCE_ENABLE = yes # Enable TapDance functionality |
| @@ -12,7 +12,6 @@ EXTRAKEY_ENABLE = no # Audio control and System control(+450) | |||
| 12 | CONSOLE_ENABLE = no # Console for debug(+400) | 12 | CONSOLE_ENABLE = no # Console for debug(+400) |
| 13 | COMMAND_ENABLE = no # Commands for debug and configuration | 13 | COMMAND_ENABLE = no # Commands for debug and configuration |
| 14 | NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | 14 | NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work |
| 15 | USB_6KRO_ENABLE = no # 6key Rollover | ||
| 16 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality | 15 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality |
| 17 | MIDI_ENABLE = no # MIDI controls | 16 | MIDI_ENABLE = no # MIDI controls |
| 18 | AUDIO_ENABLE = yes # Audio output on port C6 | 17 | AUDIO_ENABLE = yes # Audio output on port C6 |
| @@ -20,7 +19,6 @@ AUDIO_ENABLE = yes # Audio output on port C6 | |||
| 20 | UNICODE_ENABLE = no # Unicode | 19 | UNICODE_ENABLE = no # Unicode |
| 21 | UNICODEMAP_ENABLE = yes # Enable extended unicode | 20 | UNICODEMAP_ENABLE = yes # Enable extended unicode |
| 22 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | 21 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID |
| 23 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. | 22 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. |
| 24 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | 23 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE |
| 25 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | 24 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend |
| 26 | |||
diff --git a/quantum/action_util.c b/quantum/action_util.c index 2b3c00cba..9a85bd504 100644 --- a/quantum/action_util.c +++ b/quantum/action_util.c | |||
| @@ -32,16 +32,6 @@ static uint8_t weak_override_mods = 0; | |||
| 32 | static uint8_t suppressed_mods = 0; | 32 | static uint8_t suppressed_mods = 0; |
| 33 | #endif | 33 | #endif |
| 34 | 34 | ||
| 35 | #ifdef USB_6KRO_ENABLE | ||
| 36 | # define RO_ADD(a, b) ((a + b) % KEYBOARD_REPORT_KEYS) | ||
| 37 | # define RO_SUB(a, b) ((a - b + KEYBOARD_REPORT_KEYS) % KEYBOARD_REPORT_KEYS) | ||
| 38 | # define RO_INC(a) RO_ADD(a, 1) | ||
| 39 | # define RO_DEC(a) RO_SUB(a, 1) | ||
| 40 | static int8_t cb_head = 0; | ||
| 41 | static int8_t cb_tail = 0; | ||
| 42 | static int8_t cb_count = 0; | ||
| 43 | #endif | ||
| 44 | |||
| 45 | // TODO: pointer variable is not needed | 35 | // TODO: pointer variable is not needed |
| 46 | // report_keyboard_t keyboard_report = {}; | 36 | // report_keyboard_t keyboard_report = {}; |
| 47 | report_keyboard_t *keyboard_report = &(report_keyboard_t){}; | 37 | report_keyboard_t *keyboard_report = &(report_keyboard_t){}; |
diff --git a/show_options.mk b/show_options.mk index ce2f9c063..b17d8c7d9 100644 --- a/show_options.mk +++ b/show_options.mk | |||
| @@ -72,7 +72,7 @@ OTHER_OPTION_NAMES = \ | |||
| 72 | PS2_MOUSE_ENABLE \ | 72 | PS2_MOUSE_ENABLE \ |
| 73 | RAW_ENABLE \ | 73 | RAW_ENABLE \ |
| 74 | SWAP_HANDS_ENABLE \ | 74 | SWAP_HANDS_ENABLE \ |
| 75 | USB_6KRO_ENABLE \ | 75 | RING_BUFFERED_6KRO_REPORT_ENABLE \ |
| 76 | WATCHDOG_ENABLE \ | 76 | WATCHDOG_ENABLE \ |
| 77 | XT_ENABLE \ | 77 | XT_ENABLE \ |
| 78 | ERGOINU \ | 78 | ERGOINU \ |
diff --git a/tests/test_common/keyboard_report_util.cpp b/tests/test_common/keyboard_report_util.cpp index cb044c92b..f73cf239e 100644 --- a/tests/test_common/keyboard_report_util.cpp +++ b/tests/test_common/keyboard_report_util.cpp | |||
| @@ -24,7 +24,7 @@ std::vector<uint8_t> get_keys(const report_keyboard_t& report) { | |||
| 24 | std::vector<uint8_t> result; | 24 | std::vector<uint8_t> result; |
| 25 | #if defined(NKRO_ENABLE) | 25 | #if defined(NKRO_ENABLE) |
| 26 | # error NKRO support not implemented yet | 26 | # error NKRO support not implemented yet |
| 27 | #elif defined(USB_6KRO_ENABLE) | 27 | #elif defined(RING_BUFFERED_6KRO_REPORT_ENABLE) |
| 28 | # error 6KRO support not implemented yet | 28 | # error 6KRO support not implemented yet |
| 29 | #else | 29 | #else |
| 30 | for (size_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) { | 30 | for (size_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) { |
diff --git a/tmk_core/common.mk b/tmk_core/common.mk index 7f7420059..e44ff2f0a 100644 --- a/tmk_core/common.mk +++ b/tmk_core/common.mk | |||
| @@ -63,8 +63,8 @@ ifeq ($(strip $(NKRO_ENABLE)), yes) | |||
| 63 | endif | 63 | endif |
| 64 | endif | 64 | endif |
| 65 | 65 | ||
| 66 | ifeq ($(strip $(USB_6KRO_ENABLE)), yes) | 66 | ifeq ($(strip $(RING_BUFFERED_6KRO_REPORT_ENABLE)), yes) |
| 67 | TMK_COMMON_DEFS += -DUSB_6KRO_ENABLE | 67 | TMK_COMMON_DEFS += -DRING_BUFFERED_6KRO_REPORT_ENABLE |
| 68 | endif | 68 | endif |
| 69 | 69 | ||
| 70 | ifeq ($(strip $(SLEEP_LED_ENABLE)), yes) | 70 | ifeq ($(strip $(SLEEP_LED_ENABLE)), yes) |
diff --git a/tmk_core/common/report.c b/tmk_core/common/report.c index 1bcb6f2ad..2a7fc006c 100644 --- a/tmk_core/common/report.c +++ b/tmk_core/common/report.c | |||
| @@ -21,6 +21,16 @@ | |||
| 21 | #include "util.h" | 21 | #include "util.h" |
| 22 | #include <string.h> | 22 | #include <string.h> |
| 23 | 23 | ||
| 24 | #ifdef RING_BUFFERED_6KRO_REPORT_ENABLE | ||
| 25 | # define RO_ADD(a, b) ((a + b) % KEYBOARD_REPORT_KEYS) | ||
| 26 | # define RO_SUB(a, b) ((a - b + KEYBOARD_REPORT_KEYS) % KEYBOARD_REPORT_KEYS) | ||
| 27 | # define RO_INC(a) RO_ADD(a, 1) | ||
| 28 | # define RO_DEC(a) RO_SUB(a, 1) | ||
| 29 | static int8_t cb_head = 0; | ||
| 30 | static int8_t cb_tail = 0; | ||
| 31 | static int8_t cb_count = 0; | ||
| 32 | #endif | ||
| 33 | |||
| 24 | /** \brief has_anykey | 34 | /** \brief has_anykey |
| 25 | * | 35 | * |
| 26 | * FIXME: Needs doc | 36 | * FIXME: Needs doc |
| @@ -54,7 +64,7 @@ uint8_t get_first_key(report_keyboard_t* keyboard_report) { | |||
| 54 | return i << 3 | biton(keyboard_report->nkro.bits[i]); | 64 | return i << 3 | biton(keyboard_report->nkro.bits[i]); |
| 55 | } | 65 | } |
| 56 | #endif | 66 | #endif |
| 57 | #ifdef USB_6KRO_ENABLE | 67 | #ifdef RING_BUFFERED_6KRO_REPORT_ENABLE |
| 58 | uint8_t i = cb_head; | 68 | uint8_t i = cb_head; |
| 59 | do { | 69 | do { |
| 60 | if (keyboard_report->keys[i] != 0) { | 70 | if (keyboard_report->keys[i] != 0) { |
| @@ -99,7 +109,7 @@ bool is_key_pressed(report_keyboard_t* keyboard_report, uint8_t key) { | |||
| 99 | * FIXME: Needs doc | 109 | * FIXME: Needs doc |
| 100 | */ | 110 | */ |
| 101 | void add_key_byte(report_keyboard_t* keyboard_report, uint8_t code) { | 111 | void add_key_byte(report_keyboard_t* keyboard_report, uint8_t code) { |
| 102 | #ifdef USB_6KRO_ENABLE | 112 | #ifdef RING_BUFFERED_6KRO_REPORT_ENABLE |
| 103 | int8_t i = cb_head; | 113 | int8_t i = cb_head; |
| 104 | int8_t empty = -1; | 114 | int8_t empty = -1; |
| 105 | if (cb_count) { | 115 | if (cb_count) { |
| @@ -166,7 +176,7 @@ void add_key_byte(report_keyboard_t* keyboard_report, uint8_t code) { | |||
| 166 | * FIXME: Needs doc | 176 | * FIXME: Needs doc |
| 167 | */ | 177 | */ |
| 168 | void del_key_byte(report_keyboard_t* keyboard_report, uint8_t code) { | 178 | void del_key_byte(report_keyboard_t* keyboard_report, uint8_t code) { |
| 169 | #ifdef USB_6KRO_ENABLE | 179 | #ifdef RING_BUFFERED_6KRO_REPORT_ENABLE |
| 170 | uint8_t i = cb_head; | 180 | uint8_t i = cb_head; |
| 171 | if (cb_count) { | 181 | if (cb_count) { |
| 172 | do { | 182 | do { |
