diff options
author | Zach White <skullydazed@gmail.com> | 2020-08-27 09:38:04 -0700 |
---|---|---|
committer | Drashna Jael're <drashna@live.com> | 2020-09-30 03:45:36 -0700 |
commit | db2254c3ea97aababea038d8c05b7a8990a0a139 (patch) | |
tree | c8953c776c475db5b963f04cfbc17c48250dd8f1 /common_features.mk | |
parent | eb186843bb116237804a624cdc8c41873abd93a8 (diff) |
Allow joysticks to be used without analog pins (#10169)
* Allow joysticks to be used without analog pins
* change how analog/digital joysticks are specified
Diffstat (limited to 'common_features.mk')
-rw-r--r-- | common_features.mk | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/common_features.mk b/common_features.mk index 04e27b267b..45415c269c 100644 --- a/common_features.mk +++ b/common_features.mk @@ -601,9 +601,18 @@ ifeq ($(strip $(AUTO_SHIFT_ENABLE)), yes) endif endif -ifeq ($(strip $(JOYSTICK_ENABLE)), yes) +JOYSTICK_ENABLE ?= no +ifneq ($(strip $(JOYSTICK_ENABLE)), no) OPT_DEFS += -DJOYSTICK_ENABLE SRC += $(QUANTUM_DIR)/process_keycode/process_joystick.c SRC += $(QUANTUM_DIR)/joystick.c +endif + +ifeq ($(strip $(JOYSTICK_ENABLE)), analog) + OPT_DEFS += -DANALOG_JOYSTICK_ENABLE SRC += analog.c endif + +ifeq ($(strip $(JOYSTICK_ENABLE)), digital) + OPT_DEFS += -DDIGITAL_JOYSTICK_ENABLE +endif |