diff options
Diffstat (limited to 'common_features.mk')
-rw-r--r-- | common_features.mk | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/common_features.mk b/common_features.mk index 8c593024f0..e00f95f8e4 100644 --- a/common_features.mk +++ b/common_features.mk @@ -20,7 +20,6 @@ QUANTUM_SRC += \ $(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 \ @@ -109,7 +108,7 @@ ifeq ($(strip $(MOUSEKEY_ENABLE)), yes) SRC += $(QUANTUM_DIR)/mousekey.c endif -VALID_POINTING_DEVICE_DRIVER_TYPES := adns5050 adns9800 analog_joystick cirque_pinnacle_i2c cirque_pinnacle_spi pmw3360 pimoroni_trackball custom +VALID_POINTING_DEVICE_DRIVER_TYPES := adns5050 adns9800 analog_joystick cirque_pinnacle_i2c cirque_pinnacle_spi pmw3360 pmw3389 pimoroni_trackball custom POINTING_DEVICE_DRIVER ?= custom ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes) ifeq ($(filter $(POINTING_DEVICE_DRIVER),$(VALID_POINTING_DEVICE_DRIVER_TYPES)),) @@ -144,6 +143,9 @@ ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes) else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), pmw3360) OPT_DEFS += -DSTM32_SPI -DHAL_USE_SPI=TRUE QUANTUM_LIB_SRC += spi_master.c + else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), pmw3389) + OPT_DEFS += -DSTM32_SPI -DHAL_USE_SPI=TRUE + QUANTUM_LIB_SRC += spi_master.c endif endif endif @@ -155,47 +157,61 @@ ifeq ($(filter $(EEPROM_DRIVER),$(VALID_EEPROM_DRIVER_TYPES)),) else OPT_DEFS += -DEEPROM_ENABLE ifeq ($(strip $(EEPROM_DRIVER)), custom) + # Custom EEPROM implementation -- only needs to implement init/erase/read_block/write_block OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_CUSTOM COMMON_VPATH += $(DRIVER_PATH)/eeprom SRC += eeprom_driver.c else ifeq ($(strip $(EEPROM_DRIVER)), i2c) + # External I2C EEPROM implementation OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_I2C COMMON_VPATH += $(DRIVER_PATH)/eeprom QUANTUM_LIB_SRC += i2c_master.c SRC += eeprom_driver.c eeprom_i2c.c else ifeq ($(strip $(EEPROM_DRIVER)), spi) + # External SPI EEPROM implementation OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_SPI COMMON_VPATH += $(DRIVER_PATH)/eeprom QUANTUM_LIB_SRC += spi_master.c SRC += eeprom_driver.c eeprom_spi.c else ifeq ($(strip $(EEPROM_DRIVER)), transient) + # Transient EEPROM implementation -- no data storage but provides runtime area for it OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_TRANSIENT COMMON_VPATH += $(DRIVER_PATH)/eeprom SRC += eeprom_driver.c eeprom_transient.c else ifeq ($(strip $(EEPROM_DRIVER)), vendor) + # Vendor-implemented EEPROM OPT_DEFS += -DEEPROM_VENDOR ifeq ($(PLATFORM),AVR) # Automatically provided by avr-libc, nothing required else ifeq ($(PLATFORM),CHIBIOS) ifneq ($(filter STM32F3xx_% STM32F1xx_% %_STM32F401xC %_STM32F401xE %_STM32F405xG %_STM32F411xE %_STM32F072xB %_STM32F042x6 %_GD32VF103xB %_GD32VF103x8, $(MCU_SERIES)_$(MCU_LDSCRIPT)),) + # Emulated EEPROM OPT_DEFS += -DEEPROM_DRIVER COMMON_VPATH += $(DRIVER_PATH)/eeprom SRC += eeprom_driver.c SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c else ifneq ($(filter $(MCU_SERIES),STM32L0xx STM32L1xx),) + # True EEPROM on STM32L0xx, L1xx OPT_DEFS += -DEEPROM_DRIVER COMMON_VPATH += $(DRIVER_PATH)/eeprom COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/eeprom SRC += eeprom_driver.c SRC += eeprom_stm32_L0_L1.c + else ifneq ($(filter $(MCU_SERIES),KL2x K20x),) + # Teensy EEPROM implementations + SRC += eeprom_teensy.c else - # This will effectively work the same as "transient" if not supported by the chip - SRC += $(PLATFORM_COMMON_DIR)/eeprom_teensy.c + # Fall back to transient, i.e. non-persistent + OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_TRANSIENT + COMMON_VPATH += $(DRIVER_PATH)/eeprom + SRC += eeprom_driver.c eeprom_transient.c endif else ifeq ($(PLATFORM),ARM_ATSAM) + # arm_atsam EEPROM SRC += $(PLATFORM_COMMON_DIR)/eeprom.c else ifeq ($(PLATFORM),TEST) + # Test harness "EEPROM" SRC += $(PLATFORM_COMMON_DIR)/eeprom.c endif endif @@ -356,7 +372,7 @@ endif ifeq ($(strip $(PRINTING_ENABLE)), yes) OPT_DEFS += -DPRINTING_ENABLE SRC += $(QUANTUM_DIR)/process_keycode/process_printer.c - SRC += $(TMK_DIR)/protocol/serial_uart.c + QUANTUM_LIB_SRC += uart.c endif VARIABLE_TRACE ?= no @@ -604,6 +620,7 @@ ifeq ($(strip $(UNICODE_ENABLE)), yes) endif ifeq ($(strip $(UNICODE_COMMON)), yes) + OPT_DEFS += -DUNICODE_COMMON_ENABLE SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c endif @@ -719,6 +736,7 @@ ifeq ($(strip $(BLUETOOTH_ENABLE)), yes) ifeq ($(strip $(BLUETOOTH_DRIVER)), RN42) OPT_DEFS += -DMODULE_RN42 - SRC += $(TMK_DIR)/protocol/serial_uart.c + SRC += $(DRIVER_PATH)/bluetooth/rn42.c + QUANTUM_LIB_SRC += uart.c endif endif |