summaryrefslogtreecommitdiff
path: root/builddefs
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2024-02-28 21:47:37 +1100
committerNick Brassel <nick@tzarc.org>2024-02-28 21:47:37 +1100
commit4e369d405af6bba1adce6337b2e1b1ea1788566c (patch)
treeb0f020feff1809e37c9e7795d344929ff0bb290a /builddefs
parent4e04da397ef643f8fcf4afbe1d19f63aee1fc561 (diff)
parentdd1706e468bb18dd7f7ae143de735a5d3be1bfb8 (diff)
Merge branch 'develop'
Diffstat (limited to 'builddefs')
-rw-r--r--builddefs/common_features.mk109
-rw-r--r--builddefs/generic_features.mk1
2 files changed, 64 insertions, 46 deletions
diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk
index 60f1cbd837..7227a5558e 100644
--- a/builddefs/common_features.mk
+++ b/builddefs/common_features.mk
@@ -313,6 +313,7 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
OPT_DEFS += -DRGBLIGHT_$(strip $(shell echo $(RGBLIGHT_DRIVER) | tr '[:lower:]' '[:upper:]'))
SRC += $(QUANTUM_DIR)/color.c
SRC += $(QUANTUM_DIR)/rgblight/rgblight.c
+ SRC += $(QUANTUM_DIR)/rgblight/rgblight_drivers.c
CIE1931_CURVE := yes
RGB_KEYCODES_ENABLE := yes
endif
@@ -339,7 +340,7 @@ LED_MATRIX_DRIVER := snled27351
endif
LED_MATRIX_ENABLE ?= no
-VALID_LED_MATRIX_TYPES := is31fl3218 is31fl3731 is31fl3733 is31fl3736 is31fl3737 is31fl3741 is31fl3742a is31fl3743a is31fl3745 is31fl3746a snled27351 custom
+VALID_LED_MATRIX_TYPES := is31fl3218 is31fl3729 is31fl3731 is31fl3733 is31fl3736 is31fl3737 is31fl3741 is31fl3742a is31fl3743a is31fl3745 is31fl3746a snled27351 custom
ifeq ($(strip $(LED_MATRIX_ENABLE)), yes)
ifeq ($(filter $(LED_MATRIX_DRIVER),$(VALID_LED_MATRIX_TYPES)),)
@@ -361,71 +362,73 @@ ifeq ($(strip $(LED_MATRIX_ENABLE)), yes)
ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3218)
I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
- SRC += is31fl3218-simple.c
+ SRC += is31fl3218-mono.c
+ endif
+
+ ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3729)
+ I2C_DRIVER_REQUIRED = yes
+ COMMON_VPATH += $(DRIVER_PATH)/led/issi
+ SRC += is31fl3729-mono.c
endif
ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3731)
I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
- SRC += is31fl3731-simple.c
+ SRC += is31fl3731-mono.c
endif
ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3733)
I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
- SRC += is31fl3733-simple.c
+ SRC += is31fl3733-mono.c
endif
ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3736)
I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
- SRC += is31fl3736-simple.c
+ SRC += is31fl3736-mono.c
endif
ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3737)
I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
- SRC += is31fl3737-simple.c
+ SRC += is31fl3737-mono.c
endif
ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3741)
I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
- SRC += is31fl3741-simple.c
+ SRC += is31fl3741-mono.c
endif
ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3742a)
- OPT_DEFS += -DIS31FLCOMMON
I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
- SRC += is31flcommon.c
+ SRC += is31fl3742a-mono.c
endif
ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3743a)
- OPT_DEFS += -DIS31FLCOMMON
I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
- SRC += is31flcommon.c
+ SRC += is31fl3743a-mono.c
endif
ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3745)
- OPT_DEFS += -DIS31FLCOMMON
I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
- SRC += is31flcommon.c
+ SRC += is31fl3745-mono.c
endif
ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3746a)
- OPT_DEFS += -DIS31FLCOMMON
I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
- SRC += is31flcommon.c
+ SRC += is31fl3746a-mono.c
endif
ifeq ($(strip $(LED_MATRIX_DRIVER)), snled27351)
I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led
- SRC += snled27351-simple.c
+ SRC += snled27351-mono.c
endif
endif
@@ -440,7 +443,7 @@ endif
RGB_MATRIX_ENABLE ?= no
-VALID_RGB_MATRIX_TYPES := aw20216s is31fl3218 is31fl3731 is31fl3733 is31fl3736 is31fl3737 is31fl3741 is31fl3742a is31fl3743a is31fl3745 is31fl3746a snled27351 ws2812 custom
+VALID_RGB_MATRIX_TYPES := aw20216s is31fl3218 is31fl3729 is31fl3731 is31fl3733 is31fl3736 is31fl3737 is31fl3741 is31fl3742a is31fl3743a is31fl3745 is31fl3746a snled27351 ws2812 custom
ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
ifeq ($(filter $(RGB_MATRIX_DRIVER),$(VALID_RGB_MATRIX_TYPES)),)
$(call CATASTROPHIC_ERROR,Invalid RGB_MATRIX_DRIVER,RGB_MATRIX_DRIVER="$(RGB_MATRIX_DRIVER)" is not a valid matrix type)
@@ -471,6 +474,12 @@ ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
SRC += is31fl3218.c
endif
+ ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3729)
+ I2C_DRIVER_REQUIRED = yes
+ COMMON_VPATH += $(DRIVER_PATH)/led/issi
+ SRC += is31fl3729.c
+ endif
+
ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3731)
I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
@@ -502,31 +511,27 @@ ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
endif
ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3742a)
- OPT_DEFS += -DIS31FLCOMMON
I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
- SRC += is31flcommon.c
+ SRC += is31fl3742a.c
endif
ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3743a)
- OPT_DEFS += -DIS31FLCOMMON
I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
- SRC += is31flcommon.c
+ SRC += is31fl3743a.c
endif
ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3745)
- OPT_DEFS += -DIS31FLCOMMON
I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
- SRC += is31flcommon.c
+ SRC += is31fl3745.c
endif
ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3746a)
- OPT_DEFS += -DIS31FLCOMMON
I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
- SRC += is31flcommon.c
+ SRC += is31fl3746a.c
endif
ifeq ($(strip $(RGB_MATRIX_DRIVER)), snled27351)
@@ -615,24 +620,9 @@ ifeq ($(strip $(VIA_ENABLE)), yes)
TRI_LAYER_ENABLE := yes
endif
-VALID_MAGIC_TYPES := yes
-BOOTMAGIC_ENABLE ?= no
-ifneq ($(strip $(BOOTMAGIC_ENABLE)), no)
- ifeq ($(filter $(BOOTMAGIC_ENABLE),$(VALID_MAGIC_TYPES)),)
- $(call CATASTROPHIC_ERROR,Invalid BOOTMAGIC_ENABLE,BOOTMAGIC_ENABLE="$(BOOTMAGIC_ENABLE)" is not a valid type of magic)
- endif
- ifneq ($(strip $(BOOTMAGIC_ENABLE)), no)
- OPT_DEFS += -DBOOTMAGIC_LITE
- QUANTUM_SRC += $(QUANTUM_DIR)/bootmagic/bootmagic_lite.c
- endif
-endif
-COMMON_VPATH += $(QUANTUM_DIR)/bootmagic
-QUANTUM_SRC += $(QUANTUM_DIR)/bootmagic/magic.c
-
VALID_CUSTOM_MATRIX_TYPES:= yes lite no
CUSTOM_MATRIX ?= no
-
ifneq ($(strip $(CUSTOM_MATRIX)), yes)
ifeq ($(filter $(CUSTOM_MATRIX),$(VALID_CUSTOM_MATRIX_TYPES)),)
$(call CATASTROPHIC_ERROR,Invalid CUSTOM_MATRIX,CUSTOM_MATRIX="$(CUSTOM_MATRIX)" is not a valid custom matrix type)
@@ -837,15 +827,12 @@ ifeq ($(strip $(JOYSTICK_ENABLE)), yes)
$(call CATASTROPHIC_ERROR,Invalid JOYSTICK_DRIVER,JOYSTICK_DRIVER="$(JOYSTICK_DRIVER)" is not a valid joystick driver)
endif
OPT_DEFS += -DJOYSTICK_ENABLE
+ OPT_DEFS += -DJOYSTICK_$(strip $(shell echo $(JOYSTICK_DRIVER) | tr '[:lower:]' '[:upper:]'))
SRC += $(QUANTUM_DIR)/process_keycode/process_joystick.c
SRC += $(QUANTUM_DIR)/joystick.c
ifeq ($(strip $(JOYSTICK_DRIVER)), analog)
ANALOG_DRIVER_REQUIRED = yes
- OPT_DEFS += -DANALOG_JOYSTICK_ENABLE
- endif
- ifeq ($(strip $(JOYSTICK_DRIVER)), digital)
- OPT_DEFS += -DDIGITAL_JOYSTICK_ENABLE
endif
endif
@@ -899,14 +886,35 @@ ifeq ($(strip $(BLUETOOTH_ENABLE)), yes)
endif
endif
+ENCODER_ENABLE ?= no
+ENCODER_DRIVER ?= quadrature
+VALID_ENCODER_DRIVER_TYPES := quadrature custom
ifeq ($(strip $(ENCODER_ENABLE)), yes)
+ ifeq ($(filter $(ENCODER_DRIVER),$(VALID_ENCODER_DRIVER_TYPES)),)
+ $(call CATASTROPHIC_ERROR,Invalid ENCODER_DRIVER,ENCODER_DRIVER="$(ENCODER_DRIVER)" is not a valid encoder driver)
+ endif
SRC += $(QUANTUM_DIR)/encoder.c
OPT_DEFS += -DENCODER_ENABLE
+ OPT_DEFS += -DENCODER_DRIVER_$(strip $(shell echo $(ENCODER_DRIVER) | tr '[:lower:]' '[:upper:]'))
+
+ COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/encoder
+ COMMON_VPATH += $(DRIVER_PATH)/encoder
+
+ ifneq ($(strip $(ENCODER_DRIVER)), custom)
+ SRC += encoder_$(strip $(ENCODER_DRIVER)).c
+ endif
+
ifeq ($(strip $(ENCODER_MAP_ENABLE)), yes)
OPT_DEFS += -DENCODER_MAP_ENABLE
endif
endif
+ifeq ($(strip $(DIP_SWITCH_ENABLE)), yes)
+ ifeq ($(strip $(DIP_SWITCH_MAP_ENABLE)), yes)
+ OPT_DEFS += -DDIP_SWITCH_MAP_ENABLE
+ endif
+endif
+
VALID_WS2812_DRIVER_TYPES := bitbang custom i2c pwm spi vendor
WS2812_DRIVER ?= bitbang
@@ -952,6 +960,15 @@ ifeq ($(strip $(SPI_DRIVER_REQUIRED)), yes)
endif
ifeq ($(strip $(UART_DRIVER_REQUIRED)), yes)
- OPT_DEFS += -DHAL_USE_SERIAL=TRUE
- QUANTUM_LIB_SRC += uart.c
+ ifeq ($(strip $(PLATFORM)), CHIBIOS)
+ ifneq ($(filter $(MCU_SERIES),RP2040),)
+ OPT_DEFS += -DHAL_USE_SIO=TRUE
+ QUANTUM_LIB_SRC += uart_sio.c
+ else
+ OPT_DEFS += -DHAL_USE_SERIAL=TRUE
+ QUANTUM_LIB_SRC += uart_serial.c
+ endif
+ else
+ QUANTUM_LIB_SRC += uart.c
+ endif
endif
diff --git a/builddefs/generic_features.mk b/builddefs/generic_features.mk
index 9c86958625..dc34a64230 100644
--- a/builddefs/generic_features.mk
+++ b/builddefs/generic_features.mk
@@ -21,6 +21,7 @@ SPACE_CADET_ENABLE ?= yes
GENERIC_FEATURES = \
AUTO_SHIFT \
AUTOCORRECT \
+ BOOTMAGIC \
CAPS_WORD \
COMBO \
COMMAND \