aboutsummaryrefslogtreecommitdiff
path: root/common_features.mk
diff options
context:
space:
mode:
Diffstat (limited to 'common_features.mk')
-rw-r--r--common_features.mk46
1 files changed, 38 insertions, 8 deletions
diff --git a/common_features.mk b/common_features.mk
index 1a9fd46b5..33a8da23d 100644
--- a/common_features.mk
+++ b/common_features.mk
@@ -230,9 +230,12 @@ ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 at90usb162))
230 # ATmegaxxU2 does not have hardware MUL instruction - lib8tion must be told to use software multiplication routines 230 # ATmegaxxU2 does not have hardware MUL instruction - lib8tion must be told to use software multiplication routines
231 OPT_DEFS += -DLIB8_ATTINY 231 OPT_DEFS += -DLIB8_ATTINY
232endif 232endif
233 SRC += $(QUANTUM_DIR)/process_keycode/process_backlight.c 233 COMMON_VPATH += $(QUANTUM_DIR)/led_matrix
234 SRC += $(QUANTUM_DIR)/led_matrix.c 234 COMMON_VPATH += $(QUANTUM_DIR)/led_matrix/animations
235 SRC += $(QUANTUM_DIR)/led_matrix_drivers.c 235 COMMON_VPATH += $(QUANTUM_DIR)/led_matrix/animations/runners
236 SRC += process_backlight.c
237 SRC += led_matrix.c
238 SRC += led_matrix_drivers.c
236 CIE1931_CURVE := yes 239 CIE1931_CURVE := yes
237 240
238 ifeq ($(strip $(LED_MATRIX_DRIVER)), IS31FL3731) 241 ifeq ($(strip $(LED_MATRIX_DRIVER)), IS31FL3731)
@@ -244,7 +247,7 @@ endif
244endif 247endif
245 248
246RGB_MATRIX_ENABLE ?= no 249RGB_MATRIX_ENABLE ?= no
247VALID_RGB_MATRIX_TYPES := IS31FL3731 IS31FL3733 IS31FL3737 IS31FL3741 WS2812 custom 250VALID_RGB_MATRIX_TYPES := AW20216 IS31FL3731 IS31FL3733 IS31FL3737 IS31FL3741 WS2812 custom
248 251
249ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes) 252ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
250 ifeq ($(filter $(RGB_MATRIX_DRIVER),$(VALID_RGB_MATRIX_TYPES)),) 253 ifeq ($(filter $(RGB_MATRIX_DRIVER),$(VALID_RGB_MATRIX_TYPES)),)
@@ -255,12 +258,22 @@ ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 at90usb162))
255 # ATmegaxxU2 does not have hardware MUL instruction - lib8tion must be told to use software multiplication routines 258 # ATmegaxxU2 does not have hardware MUL instruction - lib8tion must be told to use software multiplication routines
256 OPT_DEFS += -DLIB8_ATTINY 259 OPT_DEFS += -DLIB8_ATTINY
257endif 260endif
258 SRC += $(QUANTUM_DIR)/color.c 261 COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix
259 SRC += $(QUANTUM_DIR)/rgb_matrix.c 262 COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix/animations
260 SRC += $(QUANTUM_DIR)/rgb_matrix_drivers.c 263 COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix/animations/runners
264 SRC += color.c
265 SRC += rgb_matrix.c
266 SRC += rgb_matrix_drivers.c
261 CIE1931_CURVE := yes 267 CIE1931_CURVE := yes
262 RGB_KEYCODES_ENABLE := yes 268 RGB_KEYCODES_ENABLE := yes
263 269
270 ifeq ($(strip $(RGB_MATRIX_DRIVER)), AW20216)
271 OPT_DEFS += -DAW20216 -DSTM32_SPI -DHAL_USE_SPI=TRUE
272 COMMON_VPATH += $(DRIVER_PATH)/awinic
273 SRC += aw20216.c
274 QUANTUM_LIB_SRC += spi_master.c
275 endif
276
264 ifeq ($(strip $(RGB_MATRIX_DRIVER)), IS31FL3731) 277 ifeq ($(strip $(RGB_MATRIX_DRIVER)), IS31FL3731)
265 OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE 278 OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE
266 COMMON_VPATH += $(DRIVER_PATH)/issi 279 COMMON_VPATH += $(DRIVER_PATH)/issi
@@ -529,7 +542,11 @@ ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
529 542
530 # Determine which (if any) transport files are required 543 # Determine which (if any) transport files are required
531 ifneq ($(strip $(SPLIT_TRANSPORT)), custom) 544 ifneq ($(strip $(SPLIT_TRANSPORT)), custom)
532 QUANTUM_LIB_SRC += $(QUANTUM_DIR)/split_common/transport.c 545 QUANTUM_SRC += $(QUANTUM_DIR)/split_common/transport.c \
546 $(QUANTUM_DIR)/split_common/transactions.c
547
548 OPT_DEFS += -DSPLIT_COMMON_TRANSACTIONS
549
533 # Functions added via QUANTUM_LIB_SRC are only included in the final binary if they're called. 550 # Functions added via QUANTUM_LIB_SRC are only included in the final binary if they're called.
534 # Unused functions are pruned away, which is why we can add multiple drivers here without bloat. 551 # Unused functions are pruned away, which is why we can add multiple drivers here without bloat.
535 ifeq ($(PLATFORM),AVR) 552 ifeq ($(PLATFORM),AVR)
@@ -550,6 +567,11 @@ ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
550 COMMON_VPATH += $(QUANTUM_PATH)/split_common 567 COMMON_VPATH += $(QUANTUM_PATH)/split_common
551endif 568endif
552 569
570ifeq ($(strip $(CRC_ENABLE)), yes)
571 OPT_DEFS += -DCRC_ENABLE
572 QUANTUM_LIB_SRC += crc.c
573endif
574
553HAPTIC_ENABLE ?= no 575HAPTIC_ENABLE ?= no
554ifneq ($(strip $(HAPTIC_ENABLE)),no) 576ifneq ($(strip $(HAPTIC_ENABLE)),no)
555 COMMON_VPATH += $(DRIVER_PATH)/haptic 577 COMMON_VPATH += $(DRIVER_PATH)/haptic
@@ -580,6 +602,14 @@ ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes)
580 SRC += oled_driver.c 602 SRC += oled_driver.c
581endif 603endif
582 604
605ifeq ($(strip $(ST7565_ENABLE)), yes)
606 OPT_DEFS += -DST7565_ENABLE
607 COMMON_VPATH += $(DRIVER_PATH)/oled # For glcdfont.h
608 COMMON_VPATH += $(DRIVER_PATH)/lcd
609 QUANTUM_LIB_SRC += spi_master.c
610 SRC += st7565.c
611endif
612
583include $(DRIVER_PATH)/qwiic/qwiic.mk 613include $(DRIVER_PATH)/qwiic/qwiic.mk
584 614
585ifeq ($(strip $(UCIS_ENABLE)), yes) 615ifeq ($(strip $(UCIS_ENABLE)), yes)