aboutsummaryrefslogtreecommitdiffstats
path: root/common_features.mk
diff options
context:
space:
mode:
authorGravatar Drashna Jaelre <drashna@live.com>2019-09-14 19:57:07 -0700
committerGravatar GitHub <noreply@github.com>2019-09-14 19:57:07 -0700
commit265d8abee16ef73bcaf8cdc70a8e0532fbfb0fda (patch)
treec002885270c3c0cfd708691d97ef2c3cc1c16246 /common_features.mk
parentd13e0b5cfc354c60da32d1c22c6930c75945937f (diff)
downloadqmk_firmware-265d8abee16ef73bcaf8cdc70a8e0532fbfb0fda.tar.gz
Fix enables for Haptic Feedback (#6707)
* Fix enables for Haptic Feedback If you enabled bothe DRV2605 and SOLENOID, it would only enable one of these, not both. This fixes the check so that you can enable both options. * Fix check for haptic feature
Diffstat (limited to 'common_features.mk')
-rw-r--r--common_features.mk17
1 files changed, 9 insertions, 8 deletions
diff --git a/common_features.mk b/common_features.mk
index 3bc6f1c73..79af8a225 100644
--- a/common_features.mk
+++ b/common_features.mk
@@ -267,20 +267,21 @@ ifeq ($(strip $(ENCODER_ENABLE)), yes)
OPT_DEFS += -DENCODER_ENABLE
endif
-ifeq ($(strip $(HAPTIC_ENABLE)), DRV2605L)
- COMMON_VPATH += $(DRIVER_PATH)/haptic
- SRC += haptic.c
+HAPTIC_ENABLE ?= no
+ifneq ($(strip $(HAPTIC_ENABLE)),no)
+ COMMON_VPATH += $(DRIVER_PATH)/haptic
+ SRC += haptic.c
+ OPT_DEFS += -DHAPTIC_ENABLE
+endif
+
+ifneq ($(filter DRV2605L, $(HAPTIC_ENABLE)), )
SRC += DRV2605L.c
QUANTUM_LIB_SRC += i2c_master.c
- OPT_DEFS += -DHAPTIC_ENABLE
OPT_DEFS += -DDRV2605L
endif
-ifeq ($(strip $(HAPTIC_ENABLE)), SOLENOID)
- COMMON_VPATH += $(DRIVER_PATH)/haptic
- SRC += haptic.c
+ifneq ($(filter SOLENOID, $(HAPTIC_ENABLE)), )
SRC += solenoid.c
- OPT_DEFS += -DHAPTIC_ENABLE
OPT_DEFS += -DSOLENOID_ENABLE
endif