diff options
| author | Zach White <skullydazed@gmail.com> | 2020-08-27 09:38:04 -0700 |
|---|---|---|
| committer | James Young <18669334+noroadsleft@users.noreply.github.com> | 2020-08-29 14:30:02 -0700 |
| commit | bdd8d2679ba74715b38f958b071fd57eaf092b9d (patch) | |
| tree | 734407eaf72d2f408a6c0ab7ffb539df0c62bdc3 /common_features.mk | |
| parent | 629cfc7f5ebd815231c9e3f969170995db1481c6 (diff) | |
| download | qmk_firmware-bdd8d2679ba74715b38f958b071fd57eaf092b9d.tar.gz qmk_firmware-bdd8d2679ba74715b38f958b071fd57eaf092b9d.zip | |
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 088db89ca..1f110d081 100644 --- a/common_features.mk +++ b/common_features.mk | |||
| @@ -536,9 +536,18 @@ ifeq ($(strip $(AUTO_SHIFT_ENABLE)), yes) | |||
| 536 | endif | 536 | endif |
| 537 | endif | 537 | endif |
| 538 | 538 | ||
| 539 | ifeq ($(strip $(JOYSTICK_ENABLE)), yes) | 539 | JOYSTICK_ENABLE ?= no |
| 540 | ifneq ($(strip $(JOYSTICK_ENABLE)), no) | ||
| 540 | OPT_DEFS += -DJOYSTICK_ENABLE | 541 | OPT_DEFS += -DJOYSTICK_ENABLE |
| 541 | SRC += $(QUANTUM_DIR)/process_keycode/process_joystick.c | 542 | SRC += $(QUANTUM_DIR)/process_keycode/process_joystick.c |
| 542 | SRC += $(QUANTUM_DIR)/joystick.c | 543 | SRC += $(QUANTUM_DIR)/joystick.c |
| 544 | endif | ||
| 545 | |||
| 546 | ifeq ($(strip $(JOYSTICK_ENABLE)), analog) | ||
| 547 | OPT_DEFS += -DANALOG_JOYSTICK_ENABLE | ||
| 543 | SRC += analog.c | 548 | SRC += analog.c |
| 544 | endif | 549 | endif |
| 550 | |||
| 551 | ifeq ($(strip $(JOYSTICK_ENABLE)), digital) | ||
| 552 | OPT_DEFS += -DDIGITAL_JOYSTICK_ENABLE | ||
| 553 | endif | ||
