diff options
| author | Ryan <fauxpark@gmail.com> | 2021-09-09 10:27:58 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-09 10:27:58 +1000 |
| commit | 9e77cdf4e66ff1cfdd7effaf77e129bf3ae9a1a5 (patch) | |
| tree | 03df93c79281afb39509bb4a0d30b94d519ce7a0 /common_features.mk | |
| parent | 3f2a030de6a306ed72eafe7aa143a5b695f9469d (diff) | |
| download | qmk_firmware-9e77cdf4e66ff1cfdd7effaf77e129bf3ae9a1a5.tar.gz qmk_firmware-9e77cdf4e66ff1cfdd7effaf77e129bf3ae9a1a5.zip | |
Bugfix for Joystick and JSON schema (#14295)
Diffstat (limited to 'common_features.mk')
| -rw-r--r-- | common_features.mk | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/common_features.mk b/common_features.mk index c92f98ab7..f4f79000b 100644 --- a/common_features.mk +++ b/common_features.mk | |||
| @@ -698,19 +698,23 @@ ifeq ($(strip $(AUTO_SHIFT_ENABLE)), yes) | |||
| 698 | endif | 698 | endif |
| 699 | 699 | ||
| 700 | JOYSTICK_ENABLE ?= no | 700 | JOYSTICK_ENABLE ?= no |
| 701 | ifneq ($(strip $(JOYSTICK_ENABLE)), no) | 701 | VALID_JOYSTICK_TYPES := analog digital |
| 702 | JOYSTICK_DRIVER ?= analog | ||
| 703 | ifeq ($(strip $(JOYSTICK_ENABLE)), yes) | ||
| 704 | ifeq ($(filter $(JOYSTICK_DRIVER),$(VALID_JOYSTICK_TYPES)),) | ||
| 705 | $(error "$(JOYSTICK_DRIVER)" is not a valid joystick driver) | ||
| 706 | endif | ||
| 702 | OPT_DEFS += -DJOYSTICK_ENABLE | 707 | OPT_DEFS += -DJOYSTICK_ENABLE |
| 703 | SRC += $(QUANTUM_DIR)/process_keycode/process_joystick.c | 708 | SRC += $(QUANTUM_DIR)/process_keycode/process_joystick.c |
| 704 | SRC += $(QUANTUM_DIR)/joystick.c | 709 | SRC += $(QUANTUM_DIR)/joystick.c |
| 705 | endif | ||
| 706 | |||
| 707 | ifeq ($(strip $(JOYSTICK_ENABLE)), analog) | ||
| 708 | OPT_DEFS += -DANALOG_JOYSTICK_ENABLE | ||
| 709 | SRC += analog.c | ||
| 710 | endif | ||
| 711 | 710 | ||
| 712 | ifeq ($(strip $(JOYSTICK_ENABLE)), digital) | 711 | ifeq ($(strip $(JOYSTICK_DRIVER)), analog) |
| 713 | OPT_DEFS += -DDIGITAL_JOYSTICK_ENABLE | 712 | OPT_DEFS += -DANALOG_JOYSTICK_ENABLE |
| 713 | SRC += analog.c | ||
| 714 | endif | ||
| 715 | ifeq ($(strip $(JOYSTICK_DRIVER)), digital) | ||
| 716 | OPT_DEFS += -DDIGITAL_JOYSTICK_ENABLE | ||
| 717 | endif | ||
| 714 | endif | 718 | endif |
| 715 | 719 | ||
| 716 | DIGITIZER_ENABLE ?= no | 720 | DIGITIZER_ENABLE ?= no |
