summaryrefslogtreecommitdiff
path: root/common_features.mk
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2021-10-20 21:18:49 +0100
committerGitHub <noreply@github.com>2021-10-20 21:18:49 +0100
commitd4be4b67a251ecc046d857c5cd00cfb37c394ab7 (patch)
tree15f6dd05ec293081782a9b42a30e1a81b33b6aa0 /common_features.mk
parent5500c428dd41348243e8a1695986b0da070e2ffa (diff)
Relocate PS2 code (#14895)
* Relocate ps2 protocol code * clang * Move makefile logic
Diffstat (limited to 'common_features.mk')
-rw-r--r--common_features.mk34
1 files changed, 34 insertions, 0 deletions
diff --git a/common_features.mk b/common_features.mk
index 9b9425dc33..083aa4aaa4 100644
--- a/common_features.mk
+++ b/common_features.mk
@@ -576,6 +576,40 @@ ifeq ($(strip $(AUTO_SHIFT_ENABLE)), yes)
endif
endif
+ifeq ($(strip $(PS2_MOUSE_ENABLE)), yes)
+ PS2_ENABLE := yes
+ SRC += ps2_mouse.c
+ OPT_DEFS += -DPS2_MOUSE_ENABLE
+ OPT_DEFS += -DMOUSE_ENABLE
+endif
+
+ifeq ($(strip $(PS2_USE_BUSYWAIT)), yes)
+ PS2_ENABLE := yes
+ SRC += ps2_busywait.c
+ SRC += ps2_io_avr.c
+ OPT_DEFS += -DPS2_USE_BUSYWAIT
+endif
+
+ifeq ($(strip $(PS2_USE_INT)), yes)
+ PS2_ENABLE := yes
+ SRC += ps2_interrupt.c
+ SRC += ps2_io.c
+ OPT_DEFS += -DPS2_USE_INT
+endif
+
+ifeq ($(strip $(PS2_USE_USART)), yes)
+ PS2_ENABLE := yes
+ SRC += ps2_usart.c
+ SRC += ps2_io.c
+ OPT_DEFS += -DPS2_USE_USART
+endif
+
+ifeq ($(strip $(PS2_ENABLE)), yes)
+ COMMON_VPATH += $(DRIVER_PATH)/ps2
+ COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/ps2
+ OPT_DEFS += -DPS2_ENABLE
+endif
+
JOYSTICK_ENABLE ?= no
VALID_JOYSTICK_TYPES := analog digital
JOYSTICK_DRIVER ?= analog