diff options
Diffstat (limited to 'common_features.mk')
-rw-r--r-- | common_features.mk | 59 |
1 files changed, 46 insertions, 13 deletions
diff --git a/common_features.mk b/common_features.mk index 1a9fd46b55..f071103408 100644 --- a/common_features.mk +++ b/common_features.mk @@ -196,10 +196,11 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) ifeq ($(filter $(RGBLIGHT_DRIVER),$(VALID_RGBLIGHT_TYPES)),) $(error RGBLIGHT_DRIVER="$(RGBLIGHT_DRIVER)" is not a valid RGB type) else - POST_CONFIG_H += $(QUANTUM_DIR)/rgblight_post_config.h + COMMON_VPATH += $(QUANTUM_DIR)/rgblight + POST_CONFIG_H += $(QUANTUM_DIR)/rgblight/rgblight_post_config.h OPT_DEFS += -DRGBLIGHT_ENABLE SRC += $(QUANTUM_DIR)/color.c - SRC += $(QUANTUM_DIR)/rgblight.c + SRC += $(QUANTUM_DIR)/rgblight/rgblight.c CIE1931_CURVE := yes RGB_KEYCODES_ENABLE := yes endif @@ -230,9 +231,12 @@ ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 at90usb162)) # ATmegaxxU2 does not have hardware MUL instruction - lib8tion must be told to use software multiplication routines OPT_DEFS += -DLIB8_ATTINY endif + COMMON_VPATH += $(QUANTUM_DIR)/led_matrix + COMMON_VPATH += $(QUANTUM_DIR)/led_matrix/animations + COMMON_VPATH += $(QUANTUM_DIR)/led_matrix/animations/runners SRC += $(QUANTUM_DIR)/process_keycode/process_backlight.c - SRC += $(QUANTUM_DIR)/led_matrix.c - SRC += $(QUANTUM_DIR)/led_matrix_drivers.c + SRC += $(QUANTUM_DIR)/led_matrix/led_matrix.c + SRC += $(QUANTUM_DIR)/led_matrix/led_matrix_drivers.c CIE1931_CURVE := yes ifeq ($(strip $(LED_MATRIX_DRIVER)), IS31FL3731) @@ -244,7 +248,7 @@ endif endif RGB_MATRIX_ENABLE ?= no -VALID_RGB_MATRIX_TYPES := IS31FL3731 IS31FL3733 IS31FL3737 IS31FL3741 WS2812 custom +VALID_RGB_MATRIX_TYPES := AW20216 IS31FL3731 IS31FL3733 IS31FL3737 IS31FL3741 WS2812 custom ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes) ifeq ($(filter $(RGB_MATRIX_DRIVER),$(VALID_RGB_MATRIX_TYPES)),) @@ -255,12 +259,22 @@ ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 at90usb162)) # ATmegaxxU2 does not have hardware MUL instruction - lib8tion must be told to use software multiplication routines OPT_DEFS += -DLIB8_ATTINY endif + COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix + COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix/animations + COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix/animations/runners SRC += $(QUANTUM_DIR)/color.c - SRC += $(QUANTUM_DIR)/rgb_matrix.c - SRC += $(QUANTUM_DIR)/rgb_matrix_drivers.c + SRC += $(QUANTUM_DIR)/rgb_matrix/rgb_matrix.c + SRC += $(QUANTUM_DIR)/rgb_matrix/rgb_matrix_drivers.c CIE1931_CURVE := yes RGB_KEYCODES_ENABLE := yes + ifeq ($(strip $(RGB_MATRIX_DRIVER)), AW20216) + OPT_DEFS += -DAW20216 -DSTM32_SPI -DHAL_USE_SPI=TRUE + COMMON_VPATH += $(DRIVER_PATH)/awinic + SRC += aw20216.c + QUANTUM_LIB_SRC += spi_master.c + endif + ifeq ($(strip $(RGB_MATRIX_DRIVER)), IS31FL3731) OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE COMMON_VPATH += $(DRIVER_PATH)/issi @@ -318,6 +332,11 @@ ifeq ($(strip $(PRINTING_ENABLE)), yes) SRC += $(TMK_DIR)/protocol/serial_uart.c endif +ifeq ($(strip $(KEY_OVERRIDE_ENABLE)), yes) + OPT_DEFS += -DKEY_OVERRIDE_ENABLE + SRC += $(QUANTUM_DIR)/process_keycode/process_key_override.c +endif + ifeq ($(strip $(SERIAL_LINK_ENABLE)), yes) SERIAL_SRC := $(wildcard $(SERIAL_PATH)/protocol/*.c) SERIAL_SRC += $(wildcard $(SERIAL_PATH)/system/*.c) @@ -494,11 +513,7 @@ ifneq ($(strip $(CUSTOM_MATRIX)), yes) # if 'lite' then skip the actual matrix implementation ifneq ($(strip $(CUSTOM_MATRIX)), lite) # Include the standard or split matrix code if needed - ifeq ($(strip $(SPLIT_KEYBOARD)), yes) - QUANTUM_SRC += $(QUANTUM_DIR)/split_common/matrix.c - else - QUANTUM_SRC += $(QUANTUM_DIR)/matrix.c - endif + QUANTUM_SRC += $(QUANTUM_DIR)/matrix.c endif endif @@ -523,13 +538,18 @@ endif ifeq ($(strip $(SPLIT_KEYBOARD)), yes) POST_CONFIG_H += $(QUANTUM_DIR)/split_common/post_config.h OPT_DEFS += -DSPLIT_KEYBOARD + CRC_ENABLE := yes # Include files used by all split keyboards QUANTUM_SRC += $(QUANTUM_DIR)/split_common/split_util.c # Determine which (if any) transport files are required ifneq ($(strip $(SPLIT_TRANSPORT)), custom) - QUANTUM_LIB_SRC += $(QUANTUM_DIR)/split_common/transport.c + QUANTUM_SRC += $(QUANTUM_DIR)/split_common/transport.c \ + $(QUANTUM_DIR)/split_common/transactions.c + + OPT_DEFS += -DSPLIT_COMMON_TRANSACTIONS + # Functions added via QUANTUM_LIB_SRC are only included in the final binary if they're called. # Unused functions are pruned away, which is why we can add multiple drivers here without bloat. ifeq ($(PLATFORM),AVR) @@ -550,6 +570,11 @@ ifeq ($(strip $(SPLIT_KEYBOARD)), yes) COMMON_VPATH += $(QUANTUM_PATH)/split_common endif +ifeq ($(strip $(CRC_ENABLE)), yes) + OPT_DEFS += -DCRC_ENABLE + SRC += crc.c +endif + HAPTIC_ENABLE ?= no ifneq ($(strip $(HAPTIC_ENABLE)),no) COMMON_VPATH += $(DRIVER_PATH)/haptic @@ -580,6 +605,14 @@ ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes) SRC += oled_driver.c endif +ifeq ($(strip $(ST7565_ENABLE)), yes) + OPT_DEFS += -DST7565_ENABLE + COMMON_VPATH += $(DRIVER_PATH)/oled # For glcdfont.h + COMMON_VPATH += $(DRIVER_PATH)/lcd + QUANTUM_LIB_SRC += spi_master.c + SRC += st7565.c +endif + include $(DRIVER_PATH)/qwiic/qwiic.mk ifeq ($(strip $(UCIS_ENABLE)), yes) |