From d0b691df0ee74863ca54ca697aa4d4212cf401a7 Mon Sep 17 00:00:00 2001 From: alex-ong Date: Sat, 26 Jan 2019 17:03:46 +1100 Subject: DO NOT USE - debounce successfully compiled. --- common_features.mk | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'common_features.mk') diff --git a/common_features.mk b/common_features.mk index 8c3361732..9b9d017a7 100644 --- a/common_features.mk +++ b/common_features.mk @@ -249,11 +249,15 @@ endif include $(DRIVER_PATH)/qwiic/qwiic.mk + QUANTUM_SRC:= \ $(QUANTUM_DIR)/quantum.c \ $(QUANTUM_DIR)/keymap_common.c \ $(QUANTUM_DIR)/keycode_config.c + + + # Include the standard or split matrix code if needed ifneq ($(strip $(CUSTOM_MATRIX)), yes) ifeq ($(strip $(SPLIT_KEYBOARD)), yes) @@ -263,11 +267,22 @@ ifneq ($(strip $(CUSTOM_MATRIX)), yes) endif endif -# Include the standard debounce code if needed -ifneq ($(strip $(CUSTOM_DEBOUNCE)), yes) - QUANTUM_SRC += $(QUANTUM_DIR)/debounce.c +DEBOUNCE_DIR:= $(QUANTUM_DIR)/debounce +# Debounce Modules. If implemented in matrix.c, don't use these. +ifeq ($(strip $(DEBOUNCE_ALGO)), manual) + # Do nothing. do your debouncing in matrix.c +else ifeq ($(strip $(DEBOUNCE_ALGO)), sym_g) + QUANTUM_SRC += $(DEBOUNCE_DIR)/debounce_sym_g.c +else ifeq ($(strip $(DEBOUNCE_ALGO)), eager_pk) + QUANTUM_SRC += $(DEBOUNCE_DIR)/debounce_eager_pk.c +else ifeq ($(strip $(CUSTOM_MATRIX)), yes) + # Do nothing. Custom matrix code. +else # default algorithm + QUANTUM_SRC += $(DEBOUNCE_DIR)/debounce_sym_g.c endif + + ifeq ($(strip $(SPLIT_KEYBOARD)), yes) OPT_DEFS += -DSPLIT_KEYBOARD -- cgit v1.2.3-24-g4f1b From 574fc6444bf48d10317c72bc6a5c61f7e46938a3 Mon Sep 17 00:00:00 2001 From: alex-ong Date: Sat, 26 Jan 2019 17:38:52 +1100 Subject: Whitespace cleanup. --- common_features.mk | 4 ---- 1 file changed, 4 deletions(-) (limited to 'common_features.mk') 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 include $(DRIVER_PATH)/qwiic/qwiic.mk - QUANTUM_SRC:= \ $(QUANTUM_DIR)/quantum.c \ $(QUANTUM_DIR)/keymap_common.c \ $(QUANTUM_DIR)/keycode_config.c - - - # Include the standard or split matrix code if needed ifneq ($(strip $(CUSTOM_MATRIX)), yes) ifeq ($(strip $(SPLIT_KEYBOARD)), yes) -- cgit v1.2.3-24-g4f1b From cce8dfab394a643fd6d0250bc8a80a721703a154 Mon Sep 17 00:00:00 2001 From: alex-ong Date: Sat, 26 Jan 2019 20:37:47 +1100 Subject: Removed check for custom_matrix. We can safely include the debounce file for compilation when custom_matrix is used. --- common_features.mk | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'common_features.mk') diff --git a/common_features.mk b/common_features.mk index deb30706a..2c86fd31b 100644 --- a/common_features.mk +++ b/common_features.mk @@ -271,9 +271,7 @@ else ifeq ($(strip $(DEBOUNCE_ALGO)), sym_g) QUANTUM_SRC += $(DEBOUNCE_DIR)/debounce_sym_g.c else ifeq ($(strip $(DEBOUNCE_ALGO)), eager_pk) QUANTUM_SRC += $(DEBOUNCE_DIR)/debounce_eager_pk.c -else ifeq ($(strip $(CUSTOM_MATRIX)), yes) - # Do nothing. Custom matrix code. -else # default algorithm +else # default algorithm. Won't be used if we have a custom_matrix that doesn't utilize it QUANTUM_SRC += $(DEBOUNCE_DIR)/debounce_sym_g.c endif -- cgit v1.2.3-24-g4f1b From d30d5eeb27b7dc66ef18e65dc150cf76121a7148 Mon Sep 17 00:00:00 2001 From: Alex Ong Date: Sat, 26 Jan 2019 23:01:07 +1100 Subject: Renamed DEBOUNCE_ALGO to DEBOUNCE_TYPE --- common_features.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'common_features.mk') diff --git a/common_features.mk b/common_features.mk index 2c86fd31b..8e2747d5a 100644 --- a/common_features.mk +++ b/common_features.mk @@ -265,11 +265,11 @@ endif DEBOUNCE_DIR:= $(QUANTUM_DIR)/debounce # Debounce Modules. If implemented in matrix.c, don't use these. -ifeq ($(strip $(DEBOUNCE_ALGO)), manual) +ifeq ($(strip $(DEBOUNCE_TYPE)), custom) # Do nothing. do your debouncing in matrix.c -else ifeq ($(strip $(DEBOUNCE_ALGO)), sym_g) +else ifeq ($(strip $(DEBOUNCE_TYPE)), sym_g) QUANTUM_SRC += $(DEBOUNCE_DIR)/debounce_sym_g.c -else ifeq ($(strip $(DEBOUNCE_ALGO)), eager_pk) +else ifeq ($(strip $(DEBOUNCE_TYPE)), eager_pk) QUANTUM_SRC += $(DEBOUNCE_DIR)/debounce_eager_pk.c else # default algorithm. Won't be used if we have a custom_matrix that doesn't utilize it QUANTUM_SRC += $(DEBOUNCE_DIR)/debounce_sym_g.c -- cgit v1.2.3-24-g4f1b From 7d8c62993921383a35f9cd172fe0a1d2e893b2f3 Mon Sep 17 00:00:00 2001 From: alex-ong Date: Sun, 27 Jan 2019 07:23:15 +1100 Subject: Stricter, leaner DEBOUNCE_TYPE section in common_features.mk. Cleanup debounce_type.mk --- common_features.mk | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'common_features.mk') diff --git a/common_features.mk b/common_features.mk index 8e2747d5a..d03dbed09 100644 --- a/common_features.mk +++ b/common_features.mk @@ -265,14 +265,15 @@ endif DEBOUNCE_DIR:= $(QUANTUM_DIR)/debounce # Debounce Modules. If implemented in matrix.c, don't use these. -ifeq ($(strip $(DEBOUNCE_TYPE)), custom) - # Do nothing. do your debouncing in matrix.c -else ifeq ($(strip $(DEBOUNCE_TYPE)), sym_g) +DEBOUNCE_TYPE?= sym_g +VALID_DEBOUNCE_TYPES := sym_g eager_pk custom +ifeq ($(filter $(DEBOUNCE_TYPE),$(VALID_DEBOUNCE_TYPES)),) + $(error DEBOUNCE_TYPE="$(DEBOUNCE_TYPE)" is not a valid debounce algorithm) +endif +ifeq ($(strip $(DEBOUNCE_TYPE)), sym_g) QUANTUM_SRC += $(DEBOUNCE_DIR)/debounce_sym_g.c else ifeq ($(strip $(DEBOUNCE_TYPE)), eager_pk) QUANTUM_SRC += $(DEBOUNCE_DIR)/debounce_eager_pk.c -else # default algorithm. Won't be used if we have a custom_matrix that doesn't utilize it - QUANTUM_SRC += $(DEBOUNCE_DIR)/debounce_sym_g.c endif -- cgit v1.2.3-24-g4f1b