Skip to content

Commit

Permalink
Allow joysticks to be used without analog pins (qmk#10169)
Browse files Browse the repository at this point in the history
* Allow joysticks to be used without analog pins

* change how analog/digital joysticks are specified
  • Loading branch information
skullydazed authored and drashna committed Sep 30, 2020
1 parent eb18684 commit db2254c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion common_features.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit db2254c

Please sign in to comment.