summaryrefslogtreecommitdiffstats
path: root/common_features.mk
diff options
context:
space:
mode:
Diffstat (limited to 'common_features.mk')
-rw-r--r--common_features.mk129
1 files changed, 83 insertions, 46 deletions
diff --git a/common_features.mk b/common_features.mk
index 1a9fd46b55..09217c4698 100644
--- a/common_features.mk
+++ b/common_features.mk
@@ -20,8 +20,23 @@ QUANTUM_SRC += \
$(QUANTUM_DIR)/send_string.c \
$(QUANTUM_DIR)/bitwise.c \
$(QUANTUM_DIR)/led.c \
+ $(QUANTUM_DIR)/action.c \
+ $(QUANTUM_DIR)/action_layer.c \
+ $(QUANTUM_DIR)/action_macro.c \
+ $(QUANTUM_DIR)/action_tapping.c \
+ $(QUANTUM_DIR)/action_util.c \
+ $(QUANTUM_DIR)/eeconfig.c \
+ $(QUANTUM_DIR)/keyboard.c \
$(QUANTUM_DIR)/keymap_common.c \
- $(QUANTUM_DIR)/keycode_config.c
+ $(QUANTUM_DIR)/keycode_config.c \
+ $(QUANTUM_DIR)/logging/debug.c \
+ $(QUANTUM_DIR)/logging/sendchar.c \
+
+VPATH += $(QUANTUM_DIR)/logging
+# Fall back to lib/printf if there is no platform provided print
+ifeq ("$(wildcard $(TMK_PATH)/common/$(PLATFORM_KEY)/printf.mk)","")
+ include $(QUANTUM_PATH)/logging/print.mk
+endif
ifeq ($(strip $(DEBUG_MATRIX_SCAN_RATE_ENABLE)), yes)
OPT_DEFS += -DDEBUG_MATRIX_SCAN_RATE
@@ -170,6 +185,7 @@ else
else ifneq ($(filter $(MCU_SERIES),STM32L0xx STM32L1xx),)
OPT_DEFS += -DEEPROM_DRIVER
COMMON_VPATH += $(DRIVER_PATH)/eeprom
+ COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/eeprom
SRC += eeprom_driver.c eeprom_stm32_L0_L1.c
else
# This will effectively work the same as "transient" if not supported by the chip
@@ -196,10 +212,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,21 +247,25 @@ 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
+ SRC += $(LIB_PATH)/lib8tion/lib8tion.c
CIE1931_CURVE := yes
ifeq ($(strip $(LED_MATRIX_DRIVER)), IS31FL3731)
OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE
- COMMON_VPATH += $(DRIVER_PATH)/issi
+ COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31fl3731-simple.c
QUANTUM_LIB_SRC += i2c_master.c
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,36 +276,47 @@ 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
+ SRC += $(LIB_PATH)/lib8tion/lib8tion.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)/led
+ 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
+ COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31fl3731.c
QUANTUM_LIB_SRC += i2c_master.c
endif
ifeq ($(strip $(RGB_MATRIX_DRIVER)), IS31FL3733)
OPT_DEFS += -DIS31FL3733 -DSTM32_I2C -DHAL_USE_I2C=TRUE
- COMMON_VPATH += $(DRIVER_PATH)/issi
+ COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31fl3733.c
QUANTUM_LIB_SRC += i2c_master.c
endif
ifeq ($(strip $(RGB_MATRIX_DRIVER)), IS31FL3737)
OPT_DEFS += -DIS31FL3737 -DSTM32_I2C -DHAL_USE_I2C=TRUE
- COMMON_VPATH += $(DRIVER_PATH)/issi
+ COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31fl3737.c
QUANTUM_LIB_SRC += i2c_master.c
endif
ifeq ($(strip $(RGB_MATRIX_DRIVER)), IS31FL3741)
OPT_DEFS += -DIS31FL3741 -DSTM32_I2C -DHAL_USE_I2C=TRUE
- COMMON_VPATH += $(DRIVER_PATH)/issi
+ COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31fl3741.c
QUANTUM_LIB_SRC += i2c_master.c
endif
@@ -342,11 +374,6 @@ ifeq ($(strip $(LCD_ENABLE)), yes)
CIE1931_CURVE := yes
endif
-# backward compat
-ifeq ($(strip $(BACKLIGHT_CUSTOM_DRIVER)), yes)
- BACKLIGHT_DRIVER := custom
-endif
-
VALID_BACKLIGHT_TYPES := pwm timer software custom
BACKLIGHT_ENABLE ?= no
@@ -406,7 +433,7 @@ ifeq ($(strip $(WS2812_DRIVER_REQUIRED)), yes)
endif
ifeq ($(strip $(APA102_DRIVER_REQUIRED)), yes)
- COMMON_VPATH += $(DRIVER_PATH)/apa102
+ COMMON_VPATH += $(DRIVER_PATH)/led
SRC += apa102.c
endif
@@ -462,18 +489,15 @@ ifeq ($(strip $(DIP_SWITCH_ENABLE)), yes)
SRC += $(QUANTUM_DIR)/dip_switch.c
endif
-VALID_MAGIC_TYPES := yes full lite
+VALID_MAGIC_TYPES := yes lite
BOOTMAGIC_ENABLE ?= no
ifneq ($(strip $(BOOTMAGIC_ENABLE)), no)
ifeq ($(filter $(BOOTMAGIC_ENABLE),$(VALID_MAGIC_TYPES)),)
$(error BOOTMAGIC_ENABLE="$(BOOTMAGIC_ENABLE)" is not a valid type of magic)
endif
- ifneq ($(strip $(BOOTMAGIC_ENABLE)), full)
+ ifneq ($(strip $(BOOTMAGIC_ENABLE)), no)
OPT_DEFS += -DBOOTMAGIC_LITE
QUANTUM_SRC += $(QUANTUM_DIR)/bootmagic/bootmagic_lite.c
- else
- OPT_DEFS += -DBOOTMAGIC_ENABLE
- QUANTUM_SRC += $(QUANTUM_DIR)/bootmagic/bootmagic_full.c
endif
endif
COMMON_VPATH += $(QUANTUM_DIR)/bootmagic
@@ -494,42 +518,31 @@ 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
-# Support for translating old names to new names:
-ifeq ($(strip $(DEBOUNCE_TYPE)),sym_g)
- DEBOUNCE_TYPE:=sym_defer_g
-else ifeq ($(strip $(DEBOUNCE_TYPE)),eager_pk)
- DEBOUNCE_TYPE:=sym_eager_pk
-else ifeq ($(strip $(DEBOUNCE_TYPE)),sym_pk)
- DEBOUNCE_TYPE:=sym_defer_pk
-else ifeq ($(strip $(DEBOUNCE_TYPE)),eager_pr)
- DEBOUNCE_TYPE:=sym_eager_pr
-endif
-
-DEBOUNCE_DIR:= $(QUANTUM_DIR)/debounce
# Debounce Modules. Set DEBOUNCE_TYPE=custom if including one manually.
-DEBOUNCE_TYPE?= sym_defer_g
+DEBOUNCE_TYPE ?= sym_defer_g
ifneq ($(strip $(DEBOUNCE_TYPE)), custom)
- QUANTUM_SRC += $(DEBOUNCE_DIR)/$(strip $(DEBOUNCE_TYPE)).c
+ QUANTUM_SRC += $(QUANTUM_DIR)/debounce/$(strip $(DEBOUNCE_TYPE)).c
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,11 +563,17 @@ 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
- SRC += haptic.c
OPT_DEFS += -DHAPTIC_ENABLE
+ SRC += $(QUANTUM_DIR)/haptic.c
+ SRC += $(QUANTUM_DIR)/process_keycode/process_haptic.c
endif
ifneq ($(filter DRV2605L, $(HAPTIC_ENABLE)), )
@@ -569,7 +588,7 @@ ifneq ($(filter SOLENOID, $(HAPTIC_ENABLE)), )
endif
ifeq ($(strip $(HD44780_ENABLE)), yes)
- SRC += drivers/avr/hd44780.c
+ SRC += platforms/avr/drivers/hd44780.c
OPT_DEFS += -DHD44780_ENABLE
endif
@@ -580,6 +599,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)
@@ -632,6 +659,11 @@ ifeq ($(strip $(COMBO_ENABLE)), yes)
OPT_DEFS += -DCOMBO_ENABLE
endif
+ifeq ($(strip $(KEY_OVERRIDE_ENABLE)), yes)
+ SRC += $(QUANTUM_DIR)/process_keycode/process_key_override.c
+ OPT_DEFS += -DKEY_OVERRIDE_ENABLE
+endif
+
ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
SRC += $(QUANTUM_DIR)/process_keycode/process_tap_dance.c
OPT_DEFS += -DTAP_DANCE_ENABLE
@@ -671,6 +703,11 @@ ifeq ($(strip $(JOYSTICK_ENABLE)), digital)
OPT_DEFS += -DDIGITAL_JOYSTICK_ENABLE
endif
+DIGITIZER_ENABLE ?= no
+ifneq ($(strip $(DIGITIZER_ENABLE)), no)
+ SRC += $(QUANTUM_DIR)/digitizer.c
+endif
+
USBPD_ENABLE ?= no
VALID_USBPD_DRIVER_TYPES = custom vendor
USBPD_DRIVER ?= vendor