summaryrefslogtreecommitdiff
path: root/builddefs
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2023-07-21 09:17:39 +1000
committerGitHub <noreply@github.com>2023-07-21 09:17:39 +1000
commitb090354143612d2c0f5c8629510542de5bd4e29e (patch)
tree6985cc58bf943d910c83b880fe61ffd8184cd93f /builddefs
parentb20b3604042536640b5f29f85656cd55ef459180 (diff)
haptic: naming cleanups (#21551)
Diffstat (limited to 'builddefs')
-rw-r--r--builddefs/common_features.mk23
1 files changed, 14 insertions, 9 deletions
diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk
index 5687201d61..2de2bdd56b 100644
--- a/builddefs/common_features.mk
+++ b/builddefs/common_features.mk
@@ -721,18 +721,23 @@ ifeq ($(strip $(FNV_ENABLE)), yes)
SRC += qmk_fnv_type_validation.c hash_32a.c hash_64a.c
endif
+VALID_HAPTIC_DRIVER_TYPES := drv2605l solenoid
ifeq ($(strip $(HAPTIC_ENABLE)),yes)
- COMMON_VPATH += $(DRIVER_PATH)/haptic
+ ifeq ($(filter $(HAPTIC_DRIVER),$(VALID_HAPTIC_DRIVER_TYPES)),)
+ $(call CATASTROPHIC_ERROR,Invalid HAPTIC_DRIVER,HAPTIC_DRIVER="$(HAPTIC_DRIVER)" is not a valid Haptic driver)
+ else
+ COMMON_VPATH += $(DRIVER_PATH)/haptic
- ifneq ($(filter DRV2605L, $(HAPTIC_DRIVER)), )
- SRC += DRV2605L.c
- QUANTUM_LIB_SRC += i2c_master.c
- OPT_DEFS += -DDRV2605L
- endif
+ ifeq ($(strip $(HAPTIC_DRIVER)), drv2605l)
+ SRC += drv2605l.c
+ QUANTUM_LIB_SRC += i2c_master.c
+ OPT_DEFS += -DHAPTIC_DRV2605L
+ endif
- ifneq ($(filter SOLENOID, $(HAPTIC_DRIVER)), )
- SRC += solenoid.c
- OPT_DEFS += -DSOLENOID_ENABLE
+ ifeq ($(strip $(HAPTIC_DRIVER)), solenoid)
+ SRC += solenoid.c
+ OPT_DEFS += -DHAPTIC_SOLENOID
+ endif
endif
endif