diff options
| -rw-r--r-- | common_features.mk | 4 | ||||
| -rw-r--r-- | docs/feature_debounce_algo.md | 17 | ||||
| -rw-r--r-- | keyboards/handwired/xealous/rules.mk | 2 | ||||
| -rw-r--r-- | tmk_core/common.mk | 2 | ||||
| -rw-r--r-- | tmk_core/common/keyboard.c | 6 |
5 files changed, 12 insertions, 19 deletions
diff --git a/common_features.mk b/common_features.mk index 9b9d017a7..deb30706a 100644 --- a/common_features.mk +++ b/common_features.mk | |||
| @@ -249,15 +249,11 @@ endif | |||
| 249 | 249 | ||
| 250 | include $(DRIVER_PATH)/qwiic/qwiic.mk | 250 | include $(DRIVER_PATH)/qwiic/qwiic.mk |
| 251 | 251 | ||
| 252 | |||
| 253 | QUANTUM_SRC:= \ | 252 | QUANTUM_SRC:= \ |
| 254 | $(QUANTUM_DIR)/quantum.c \ | 253 | $(QUANTUM_DIR)/quantum.c \ |
| 255 | $(QUANTUM_DIR)/keymap_common.c \ | 254 | $(QUANTUM_DIR)/keymap_common.c \ |
| 256 | $(QUANTUM_DIR)/keycode_config.c | 255 | $(QUANTUM_DIR)/keycode_config.c |
| 257 | 256 | ||
| 258 | |||
| 259 | |||
| 260 | |||
| 261 | # Include the standard or split matrix code if needed | 257 | # Include the standard or split matrix code if needed |
| 262 | ifneq ($(strip $(CUSTOM_MATRIX)), yes) | 258 | ifneq ($(strip $(CUSTOM_MATRIX)), yes) |
| 263 | ifeq ($(strip $(SPLIT_KEYBOARD)), yes) | 259 | ifeq ($(strip $(SPLIT_KEYBOARD)), yes) |
diff --git a/docs/feature_debounce_algo.md b/docs/feature_debounce_algo.md index 2c694cdfb..e4489662e 100644 --- a/docs/feature_debounce_algo.md +++ b/docs/feature_debounce_algo.md | |||
| @@ -7,18 +7,16 @@ The underlying debounce algorithm is determined by which matrix.c file you are u | |||
| 7 | The logic for which debounce method called is below. It checks various defines that you have set in rules.mk | 7 | The logic for which debounce method called is below. It checks various defines that you have set in rules.mk |
| 8 | 8 | ||
| 9 | ``` | 9 | ``` |
| 10 | ifeq ($(strip $(SPLIT_KEYBOARD)), yes) | 10 | ifeq ($(strip $(DEBOUNCE_ALGO)), manual) |
| 11 | # Do nothing, debouncing is inside matrix.c inside split_common | ||
| 12 | else ifeq ($(strip $(DEBOUNCE_ALGO)), manual) | ||
| 13 | # Do nothing. do your debouncing in matrix.c | 11 | # Do nothing. do your debouncing in matrix.c |
| 14 | else ifeq ($(strip $(DEBOUNCE_ALGO)), sym_g) | 12 | else ifeq ($(strip $(DEBOUNCE_ALGO)), sym_g) |
| 15 | TMK_COMMON_SRC += $(DEBOUNCE)/debounce_sym_g.c | 13 | QUANTUM_SRC += $(DEBOUNCE)/debounce_sym_g.c |
| 16 | else ifeq ($(strip $(DEBOUNCE_ALGO)), eager_pk) | 14 | else ifeq ($(strip $(DEBOUNCE_ALGO)), eager_pk) |
| 17 | TMK_COMMON_SRC += $(DEBOUNCE)/debounce_eager_pk.c | 15 | QUANTUM_SRC += $(DEBOUNCE)/debounce_eager_pk.c |
| 18 | else ifeq ($(strip $(CUSTOM_MATRIX)), yes) | 16 | else ifeq ($(strip $(CUSTOM_MATRIX)), yes) |
| 19 | # Do nothing. Custom matrix code. | 17 | # Do nothing. Custom matrix code. |
| 20 | else # default algorithm | 18 | else # default algorithm |
| 21 | TMK_COMMON_SRC += $(DEBOUNCE)/debounce_sym_g.c | 19 | QUANTUM_SRC += $(DEBOUNCE)/debounce_sym_g.c |
| 22 | endif | 20 | endif |
| 23 | ``` | 21 | ``` |
| 24 | 22 | ||
| @@ -32,11 +30,10 @@ The following is for keyboards where ```SPLIT_KEYBOARD``` is **not** defined as | |||
| 32 | | sym_g / eager_pk | Not defined | You are using the included matrix.c and debounce.c | Nothing. Chosen debounce method used. | | 30 | | sym_g / eager_pk | Not defined | You are using the included matrix.c and debounce.c | Nothing. Chosen debounce method used. | |
| 33 | | Not defined | YES | You have your own matrix.c, and your own debounce | Write the fully debounced matrix into matrix.c's matrix | | 31 | | Not defined | YES | You have your own matrix.c, and your own debounce | Write the fully debounced matrix into matrix.c's matrix | |
| 34 | | manual | YES | Same as above | same as above | | 32 | | manual | YES | Same as above | same as above | |
| 35 | | sym_g/ eager_pk | YES | You are using your own matrix.c, but included debounce | Write the raw matrix values into matrix.c's matrix | | 33 | | sym_g / eager_pk | YES | You are using your own matrix.c, but included debounce | Write the raw matrix values into matrix.c's matrix | |
| 36 | 34 | ||
| 37 | **Note**: | 35 | **Regarding split keyboards**: |
| 38 | If ```SPLIT_KEYBOARD = YES``` is defined, the algorithm inside split_common will be used. | 36 | The debounce code is compatible with split keyboards. |
| 39 | A future pull request will fix this to use the debounce.c code. | ||
| 40 | 37 | ||
| 41 | # Use your own debouncing code | 38 | # Use your own debouncing code |
| 42 | * Set ```DEBOUNCE_ALGO = manual```. | 39 | * Set ```DEBOUNCE_ALGO = manual```. |
diff --git a/keyboards/handwired/xealous/rules.mk b/keyboards/handwired/xealous/rules.mk index 07e1c875e..37afdaff9 100644 --- a/keyboards/handwired/xealous/rules.mk +++ b/keyboards/handwired/xealous/rules.mk | |||
| @@ -68,7 +68,7 @@ SUBPROJECT_rev1 = yes | |||
| 68 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | 68 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend |
| 69 | 69 | ||
| 70 | CUSTOM_MATRIX = no | 70 | CUSTOM_MATRIX = no |
| 71 | CUSTOM_DEBOUNCE = yes | 71 | DEBOUNCE_ALGO = manual |
| 72 | 72 | ||
| 73 | LAYOUTS = split60 | 73 | LAYOUTS = split60 |
| 74 | 74 | ||
diff --git a/tmk_core/common.mk b/tmk_core/common.mk index 335a36cfe..063115acb 100644 --- a/tmk_core/common.mk +++ b/tmk_core/common.mk | |||
| @@ -1,5 +1,4 @@ | |||
| 1 | COMMON_DIR = common | 1 | COMMON_DIR = common |
| 2 | |||
| 3 | ifeq ($(PLATFORM),AVR) | 2 | ifeq ($(PLATFORM),AVR) |
| 4 | PLATFORM_COMMON_DIR = $(COMMON_DIR)/avr | 3 | PLATFORM_COMMON_DIR = $(COMMON_DIR)/avr |
| 5 | else ifeq ($(PLATFORM),CHIBIOS) | 4 | else ifeq ($(PLATFORM),CHIBIOS) |
| @@ -62,6 +61,7 @@ ifeq ($(PLATFORM),TEST) | |||
| 62 | endif | 61 | endif |
| 63 | 62 | ||
| 64 | 63 | ||
| 64 | |||
| 65 | # Option modules | 65 | # Option modules |
| 66 | BOOTMAGIC_ENABLE ?= no | 66 | BOOTMAGIC_ENABLE ?= no |
| 67 | VALID_MAGIC_TYPES := yes full lite | 67 | VALID_MAGIC_TYPES := yes full lite |
diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c index d22300116..25be28d02 100644 --- a/tmk_core/common/keyboard.c +++ b/tmk_core/common/keyboard.c | |||
| @@ -163,7 +163,7 @@ bool is_keyboard_master(void) { | |||
| 163 | */ | 163 | */ |
| 164 | void keyboard_init(void) { | 164 | void keyboard_init(void) { |
| 165 | timer_init(); | 165 | timer_init(); |
| 166 | matrix_init(); | 166 | matrix_init(); |
| 167 | #ifdef QWIIC_ENABLE | 167 | #ifdef QWIIC_ENABLE |
| 168 | qwiic_init(); | 168 | qwiic_init(); |
| 169 | #endif | 169 | #endif |
| @@ -223,7 +223,7 @@ void keyboard_task(void) | |||
| 223 | uint8_t keys_processed = 0; | 223 | uint8_t keys_processed = 0; |
| 224 | #endif | 224 | #endif |
| 225 | 225 | ||
| 226 | matrix_scan(); | 226 | matrix_scan(); |
| 227 | 227 | ||
| 228 | if (is_keyboard_master()) { | 228 | if (is_keyboard_master()) { |
| 229 | for (uint8_t r = 0; r < MATRIX_ROWS; r++) { | 229 | for (uint8_t r = 0; r < MATRIX_ROWS; r++) { |
| @@ -231,7 +231,7 @@ void keyboard_task(void) | |||
| 231 | matrix_change = matrix_row ^ matrix_prev[r]; | 231 | matrix_change = matrix_row ^ matrix_prev[r]; |
| 232 | if (matrix_change) { | 232 | if (matrix_change) { |
| 233 | #ifdef MATRIX_HAS_GHOST | 233 | #ifdef MATRIX_HAS_GHOST |
| 234 | if (has_ghost_in_row(r, matrix_row)) continue; | 234 | if (has_ghost_in_row(r, matrix_row)) { continue; } |
| 235 | #endif | 235 | #endif |
| 236 | if (debug_matrix) matrix_print(); | 236 | if (debug_matrix) matrix_print(); |
| 237 | for (uint8_t c = 0; c < MATRIX_COLS; c++) { | 237 | for (uint8_t c = 0; c < MATRIX_COLS; c++) { |
