From 854547330704fb1b1f07d547d49728da8b92b2a3 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Tue, 31 May 2022 15:38:08 +1000 Subject: Removes terminal from QMK. (#17258) --- builddefs/common_features.mk | 6 ------ 1 file changed, 6 deletions(-) (limited to 'builddefs/common_features.mk') diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index c976b8296d..631558ef27 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -542,12 +542,6 @@ ifeq ($(strip $(LED_TABLES)), yes) SRC += $(QUANTUM_DIR)/led_tables.c endif -ifeq ($(strip $(TERMINAL_ENABLE)), yes) - SRC += $(QUANTUM_DIR)/process_keycode/process_terminal.c - OPT_DEFS += -DTERMINAL_ENABLE - OPT_DEFS += -DUSER_PRINT -endif - ifeq ($(strip $(VIA_ENABLE)), yes) DYNAMIC_KEYMAP_ENABLE := yes RAW_ENABLE := yes -- cgit v1.2.1 From 1085500e894d9d31c4e97e7f1b74091bb9043a91 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Wed, 8 Jun 2022 09:42:35 +1000 Subject: Rework paths for eeprom locations. (#17326) * Rework paths for eeprom locations. * File relocation. * Wrong file move. * Fixup test paths. --- builddefs/common_features.mk | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) (limited to 'builddefs/common_features.mk') diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index 631558ef27..ff0c6b0cc6 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -160,27 +160,26 @@ ifeq ($(filter $(EEPROM_DRIVER),$(VALID_EEPROM_DRIVER_TYPES)),) $(call CATASTROPHIC_ERROR,Invalid EEPROM_DRIVER,EEPROM_DRIVER="$(EEPROM_DRIVER)" is not a valid EEPROM driver) else OPT_DEFS += -DEEPROM_ENABLE + COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/eeprom + COMMON_VPATH += $(DRIVER_PATH)/eeprom + COMMON_VPATH += $(PLATFORM_COMMON_DIR) 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 @@ -191,17 +190,13 @@ else ifneq ($(filter STM32F3xx_% STM32F1xx_% %_STM32F401xC %_STM32F401xE %_STM32F405xG %_STM32F411xE %_STM32F072xB %_STM32F042x6 %_GD32VF103xB %_GD32VF103x8, $(MCU_SERIES)_$(MCU_LDSCRIPT)),) # Emulated EEPROM OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_STM32_FLASH_EMULATED - COMMON_VPATH += $(DRIVER_PATH)/eeprom - SRC += eeprom_driver.c - SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c - SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c + COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/flash + COMMON_VPATH += $(DRIVER_PATH)/flash + SRC += eeprom_driver.c eeprom_stm32.c flash_stm32.c else ifneq ($(filter $(MCU_SERIES),STM32L0xx STM32L1xx),) # True EEPROM on STM32L0xx, L1xx OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_STM32_L0_L1 - COMMON_VPATH += $(DRIVER_PATH)/eeprom - COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/eeprom - SRC += eeprom_driver.c - SRC += eeprom_stm32_L0_L1.c + SRC += eeprom_driver.c eeprom_stm32_L0_L1.c else ifneq ($(filter $(MCU_SERIES),KL2x K20x),) # Teensy EEPROM implementations OPT_DEFS += -DEEPROM_TEENSY @@ -209,17 +204,16 @@ else else # 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 OPT_DEFS += -DEEPROM_SAMD - SRC += $(PLATFORM_COMMON_DIR)/eeprom_samd.c + SRC += eeprom_samd.c else ifeq ($(PLATFORM),TEST) # Test harness "EEPROM" OPT_DEFS += -DEEPROM_TEST_HARNESS - SRC += $(PLATFORM_COMMON_DIR)/eeprom.c + SRC += eeprom.c endif endif endif -- cgit v1.2.1 From fe680a8568d275732738b07166b8f8a950d1e282 Mon Sep 17 00:00:00 2001 From: Stefan Kerkmann Date: Sat, 18 Jun 2022 00:04:17 +0200 Subject: [Core] Split ChibiOS usart split driver in protocol and hardware driver part (#16669) --- builddefs/common_features.mk | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'builddefs/common_features.mk') diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index ff0c6b0cc6..83505596d2 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -583,6 +583,14 @@ ifneq ($(strip $(DEBOUNCE_TYPE)), custom) QUANTUM_SRC += $(QUANTUM_DIR)/debounce/$(strip $(DEBOUNCE_TYPE)).c endif + +VALID_SERIAL_DRIVER_TYPES := bitbang usart + +SERIAL_DRIVER ?= bitbang +ifeq ($(filter $(SERIAL_DRIVER),$(VALID_SERIAL_DRIVER_TYPES)),) + $(call CATASTROPHIC_ERROR,Invalid SERIAL_DRIVER,SERIAL_DRIVER="$(SERIAL_DRIVER)" is not a valid SERIAL driver) +endif + ifeq ($(strip $(SPLIT_KEYBOARD)), yes) POST_CONFIG_H += $(QUANTUM_DIR)/split_common/post_config.h OPT_DEFS += -DSPLIT_KEYBOARD @@ -607,11 +615,11 @@ ifeq ($(strip $(SPLIT_KEYBOARD)), yes) endif endif - SERIAL_DRIVER ?= bitbang OPT_DEFS += -DSERIAL_DRIVER_$(strip $(shell echo $(SERIAL_DRIVER) | tr '[:lower:]' '[:upper:]')) ifeq ($(strip $(SERIAL_DRIVER)), bitbang) QUANTUM_LIB_SRC += serial.c else + QUANTUM_LIB_SRC += serial_protocol.c QUANTUM_LIB_SRC += serial_$(strip $(SERIAL_DRIVER)).c endif endif -- cgit v1.2.1 From 7060cb7b267e78ba693a77a3346c77c2d4209b01 Mon Sep 17 00:00:00 2001 From: precondition <57645186+precondition@users.noreply.github.com> Date: Thu, 23 Jun 2022 20:43:24 +0200 Subject: Refactor steno and add `STENO_PROTOCOL = [all|txbolt|geminipr]` (#17065) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Refactor steno into STENO_ENABLE_[ALL|GEMINI|BOLT] * Update stenography documentation * STENO_ENABLE_TXBOLT → STENO_ENABLE_BOLT TXBOLT is a better name but BOLT is more consistent with the pre-existing TX Bolt related constants, which all drop the "TX " prefix * Comments * STENO_ENABLE_[GEMINI|BOLT|ALL] → STENO_PROTOCOL = [geminipr|txbolt|all] * Add note on lacking V-USB support * Clear chord at the end of the switch(mode){send_steno_chord} block * Return true if NOEVENT * update_chord_xxx → add_xxx_key_to_chord * Enable the defines for all the protocols if STENO_PROTOCOL = all * Mention how to use `steno_set_mode` * Set the default steno protocol to "all" This is done so that existing keymaps invoking `steno_set_mode` don't all suddenly break * Add data driver equivalents for stenography feature * Document format of serial steno packets (Thanks dnaq) * Add missing comma --- builddefs/common_features.mk | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'builddefs/common_features.mk') diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index 83505596d2..b9ee0a30a7 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -92,10 +92,29 @@ ifeq ($(MUSIC_ENABLE), yes) SRC += $(QUANTUM_DIR)/process_keycode/process_music.c endif +VALID_STENO_PROTOCOL_TYPES := geminipr txbolt all +STENO_PROTOCOL ?= all ifeq ($(strip $(STENO_ENABLE)), yes) - OPT_DEFS += -DSTENO_ENABLE - VIRTSER_ENABLE ?= yes - SRC += $(QUANTUM_DIR)/process_keycode/process_steno.c + ifeq ($(filter $(STENO_PROTOCOL),$(VALID_STENO_PROTOCOL_TYPES)),) + $(call CATASTROPHIC_ERROR,Invalid STENO_PROTOCOL,STENO_PROTOCOL="$(STENO_PROTOCOL)" is not a valid stenography protocol) + else + OPT_DEFS += -DSTENO_ENABLE + VIRTSER_ENABLE ?= yes + + ifeq ($(strip $(STENO_PROTOCOL)), geminipr) + OPT_DEFS += -DSTENO_ENABLE_GEMINI + endif + ifeq ($(strip $(STENO_PROTOCOL)), txbolt) + OPT_DEFS += -DSTENO_ENABLE_BOLT + endif + ifeq ($(strip $(STENO_PROTOCOL)), all) + OPT_DEFS += -DSTENO_ENABLE_ALL + OPT_DEFS += -DSTENO_ENABLE_GEMINI + OPT_DEFS += -DSTENO_ENABLE_BOLT + endif + + SRC += $(QUANTUM_DIR)/process_keycode/process_steno.c + endif endif ifeq ($(strip $(VIRTSER_ENABLE)), yes) -- cgit v1.2.1 From 01ecf332ff9f0c8f61e493cdca116f58d80bb5fb Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Mon, 27 Jun 2022 07:18:21 +1000 Subject: Generic wear-leveling algorithm (#16996) * Initial import of wear-leveling algorithm. * Alignment. * Docs tweaks. * Lock/unlock. * Update quantum/wear_leveling/wear_leveling_internal.h Co-authored-by: Stefan Kerkmann * More tests, fix issue with consolidation when unlocked. * More tests. * Review comments. * Add plumbing for FNV1a. * Another test checking that checksum mismatch clears the cache. * Check that the write log still gets played back. Co-authored-by: Stefan Kerkmann --- builddefs/common_features.mk | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'builddefs/common_features.mk') diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index b9ee0a30a7..552171fe68 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -650,6 +650,12 @@ ifeq ($(strip $(CRC_ENABLE)), yes) SRC += crc.c endif +ifeq ($(strip $(FNV_ENABLE)), yes) + OPT_DEFS += -DFNV_ENABLE + VPATH += $(LIB_PATH)/fnv + SRC += qmk_fnv_type_validation.c hash_32a.c hash_64a.c +endif + ifeq ($(strip $(HAPTIC_ENABLE)),yes) COMMON_VPATH += $(DRIVER_PATH)/haptic -- cgit v1.2.1 From 34e244cecf62afb30ee5a4362867f24b03675691 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Thu, 30 Jun 2022 07:42:23 +1000 Subject: Wear-leveling EEPROM drivers: `embedded_flash`, `spi_flash`, `legacy` (#17376) --- builddefs/common_features.mk | 44 +++++++++++++++++++++++++++++++++++++++----- 1 file changed, 39 insertions(+), 5 deletions(-) (limited to 'builddefs/common_features.mk') diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index 552171fe68..b447c6743d 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -173,7 +173,7 @@ ifeq ($(strip $(QUANTUM_PAINTER_ENABLE)), yes) include $(QUANTUM_DIR)/painter/rules.mk endif -VALID_EEPROM_DRIVER_TYPES := vendor custom transient i2c spi +VALID_EEPROM_DRIVER_TYPES := vendor custom transient i2c spi wear_leveling EEPROM_DRIVER ?= vendor ifeq ($(filter $(EEPROM_DRIVER),$(VALID_EEPROM_DRIVER_TYPES)),) $(call CATASTROPHIC_ERROR,Invalid EEPROM_DRIVER,EEPROM_DRIVER="$(EEPROM_DRIVER)" is not a valid EEPROM driver) @@ -186,6 +186,10 @@ else # Custom EEPROM implementation -- only needs to implement init/erase/read_block/write_block OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_CUSTOM SRC += eeprom_driver.c + else ifeq ($(strip $(EEPROM_DRIVER)), wear_leveling) + # Wear-leveling EEPROM implementation + OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_WEAR_LEVELING + SRC += eeprom_driver.c eeprom_wear_leveling.c else ifeq ($(strip $(EEPROM_DRIVER)), i2c) # External I2C EEPROM implementation OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_I2C @@ -237,17 +241,47 @@ else endif endif +VALID_WEAR_LEVELING_DRIVER_TYPES := custom embedded_flash spi_flash legacy +WEAR_LEVELING_DRIVER ?= none +ifneq ($(strip $(WEAR_LEVELING_DRIVER)),none) + ifeq ($(filter $(WEAR_LEVELING_DRIVER),$(VALID_WEAR_LEVELING_DRIVER_TYPES)),) + $(call CATASTROPHIC_ERROR,Invalid WEAR_LEVELING_DRIVER,WEAR_LEVELING_DRIVER="$(WEAR_LEVELING_DRIVER)" is not a valid wear leveling driver) + else + FNV_ENABLE := yes + OPT_DEFS += -DWEAR_LEVELING_ENABLE + OPT_DEFS += -DWEAR_LEVELING_$(strip $(shell echo $(WEAR_LEVELING_DRIVER) | tr '[:lower:]' '[:upper:]')) + COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/wear_leveling + COMMON_VPATH += $(DRIVER_PATH)/wear_leveling + COMMON_VPATH += $(QUANTUM_DIR)/wear_leveling + SRC += wear_leveling.c + ifeq ($(strip $(WEAR_LEVELING_DRIVER)), embedded_flash) + OPT_DEFS += -DHAL_USE_EFL + SRC += wear_leveling_efl.c + POST_CONFIG_H += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/wear_leveling/wear_leveling_efl_config.h + else ifeq ($(strip $(WEAR_LEVELING_DRIVER)), spi_flash) + FLASH_DRIVER := spi + SRC += wear_leveling_flash_spi.c + POST_CONFIG_H += $(DRIVER_PATH)/wear_leveling/wear_leveling_flash_spi_config.h + else ifeq ($(strip $(WEAR_LEVELING_DRIVER)), legacy) + COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/flash + SRC += flash_stm32.c wear_leveling_legacy.c + POST_CONFIG_H += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/wear_leveling/wear_leveling_legacy_config.h + endif + endif +endif + VALID_FLASH_DRIVER_TYPES := spi -FLASH_DRIVER ?= no -ifneq ($(strip $(FLASH_DRIVER)), no) +FLASH_DRIVER ?= none +ifneq ($(strip $(FLASH_DRIVER)), none) ifeq ($(filter $(FLASH_DRIVER),$(VALID_FLASH_DRIVER_TYPES)),) - $(error FLASH_DRIVER="$(FLASH_DRIVER)" is not a valid FLASH driver) + $(call CATASTROPHIC_ERROR,Invalid FLASH_DRIVER,FLASH_DRIVER="$(FLASH_DRIVER)" is not a valid flash driver) else OPT_DEFS += -DFLASH_ENABLE - ifeq ($(strip $(FLASH_DRIVER)), spi) + ifeq ($(strip $(FLASH_DRIVER)),spi) OPT_DEFS += -DFLASH_DRIVER -DFLASH_SPI COMMON_VPATH += $(DRIVER_PATH)/flash SRC += flash_spi.c + QUANTUM_LIB_SRC += spi_master.c endif endif endif -- cgit v1.2.1 From d7173967087e022d20d1f9c812b1b668e9d3f71b Mon Sep 17 00:00:00 2001 From: Stefan Kerkmann Date: Thu, 30 Jun 2022 13:19:27 +0200 Subject: [Core] Add Raspberry Pi RP2040 support (#14877) * Disable RESET keycode because of naming conflicts * Add Pico SDK as submodule * Add RP2040 build support to QMK * Adjust USB endpoint structs for RP2040 * Add RP2040 bootloader and double-tap reset routine * Add generic and pro micro RP2040 boards * Add RP2040 onekey keyboard * Add WS2812 PIO DMA enabled driver and documentation Supports regular and open-drain output configuration. RP2040 GPIOs are sadly not 5V tolerant, so this is a bit use-less or needs extra hardware or you take the risk to fry your hardware. * Adjust SIO Driver for RP2040 * Adjust I2C Driver for RP2040 * Adjust SPI Driver for RP2040 * Add PIO serial driver and documentation * Add general RP2040 documentation * Apply suggestions from code review Co-authored-by: Nick Brassel Co-authored-by: Nick Brassel --- builddefs/common_features.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'builddefs/common_features.mk') diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index b447c6743d..2edc1bdef0 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -547,7 +547,7 @@ ifeq ($(strip $(BACKLIGHT_ENABLE)), yes) endif endif -VALID_WS2812_DRIVER_TYPES := bitbang pwm spi i2c +VALID_WS2812_DRIVER_TYPES := bitbang pwm spi i2c vendor WS2812_DRIVER ?= bitbang ifeq ($(strip $(WS2812_DRIVER_REQUIRED)), yes) @@ -637,7 +637,7 @@ ifneq ($(strip $(DEBOUNCE_TYPE)), custom) endif -VALID_SERIAL_DRIVER_TYPES := bitbang usart +VALID_SERIAL_DRIVER_TYPES := bitbang usart vendor SERIAL_DRIVER ?= bitbang ifeq ($(filter $(SERIAL_DRIVER),$(VALID_SERIAL_DRIVER_TYPES)),) -- cgit v1.2.1 From 5846b40f7444af96b0d8ddf3af9b558193c2475d Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Sat, 2 Jul 2022 15:18:50 +1000 Subject: RP2040 emulated EEPROM. (#17519) --- builddefs/common_features.mk | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'builddefs/common_features.mk') diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index 2edc1bdef0..c11e5688e3 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -220,6 +220,11 @@ else # True EEPROM on STM32L0xx, L1xx OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_STM32_L0_L1 SRC += eeprom_driver.c eeprom_stm32_L0_L1.c + else ifneq ($(filter $(MCU_SERIES),RP2040),) + # Wear-leveling EEPROM implementation, backed by RP2040 flash + OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_WEAR_LEVELING + SRC += eeprom_driver.c eeprom_wear_leveling.c + WEAR_LEVELING_DRIVER = rp2040_flash else ifneq ($(filter $(MCU_SERIES),KL2x K20x),) # Teensy EEPROM implementations OPT_DEFS += -DEEPROM_TEENSY @@ -241,7 +246,7 @@ else endif endif -VALID_WEAR_LEVELING_DRIVER_TYPES := custom embedded_flash spi_flash legacy +VALID_WEAR_LEVELING_DRIVER_TYPES := custom embedded_flash spi_flash rp2040_flash legacy WEAR_LEVELING_DRIVER ?= none ifneq ($(strip $(WEAR_LEVELING_DRIVER)),none) ifeq ($(filter $(WEAR_LEVELING_DRIVER),$(VALID_WEAR_LEVELING_DRIVER_TYPES)),) @@ -262,6 +267,9 @@ ifneq ($(strip $(WEAR_LEVELING_DRIVER)),none) FLASH_DRIVER := spi SRC += wear_leveling_flash_spi.c POST_CONFIG_H += $(DRIVER_PATH)/wear_leveling/wear_leveling_flash_spi_config.h + else ifeq ($(strip $(WEAR_LEVELING_DRIVER)), rp2040_flash) + SRC += wear_leveling_rp2040_flash.c + POST_CONFIG_H += $(DRIVER_PATH)/wear_leveling/wear_leveling_rp2040_flash_config.h else ifeq ($(strip $(WEAR_LEVELING_DRIVER)), legacy) COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/flash SRC += flash_stm32.c wear_leveling_legacy.c -- cgit v1.2.1 From 3ecb0a80af9e4ce4194a34032642933641730706 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 2 Jul 2022 22:10:08 +1000 Subject: Feature-ify Send String (#17275) --- builddefs/common_features.mk | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'builddefs/common_features.mk') diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index c11e5688e3..5cc4508307 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -15,7 +15,6 @@ QUANTUM_SRC += \ $(QUANTUM_DIR)/quantum.c \ - $(QUANTUM_DIR)/send_string.c \ $(QUANTUM_DIR)/bitwise.c \ $(QUANTUM_DIR)/led.c \ $(QUANTUM_DIR)/action.c \ @@ -774,6 +773,13 @@ ifeq ($(strip $(MAGIC_ENABLE)), yes) OPT_DEFS += -DMAGIC_KEYCODE_ENABLE endif +SEND_STRING_ENABLE ?= yes +ifeq ($(strip $(SEND_STRING_ENABLE)), yes) + OPT_DEFS += -DSEND_STRING_ENABLE + COMMON_VPATH += $(QUANTUM_DIR)/send_string + SRC += $(QUANTUM_DIR)/send_string/send_string.c +endif + ifeq ($(strip $(AUTO_SHIFT_ENABLE)), yes) SRC += $(QUANTUM_DIR)/process_keycode/process_auto_shift.c OPT_DEFS += -DAUTO_SHIFT_ENABLE -- cgit v1.2.1 From 5db705d054e54a901f8968e3380e13c791991ab3 Mon Sep 17 00:00:00 2001 From: Daniel Kao Date: Tue, 12 Jul 2022 21:17:40 -0700 Subject: Cirque trackpad features: circular scroll, inertial cursor (#17482) --- builddefs/common_features.mk | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'builddefs/common_features.mk') diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index 5cc4508307..01dbdc3330 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -149,10 +149,14 @@ ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes) else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), cirque_pinnacle_i2c) OPT_DEFS += -DSTM32_I2C -DHAL_USE_I2C=TRUE SRC += drivers/sensors/cirque_pinnacle.c + SRC += drivers/sensors/cirque_pinnacle_gestures.c + SRC += $(QUANTUM_DIR)/pointing_device_gestures.c QUANTUM_LIB_SRC += i2c_master.c else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), cirque_pinnacle_spi) OPT_DEFS += -DSTM32_SPI -DHAL_USE_SPI=TRUE SRC += drivers/sensors/cirque_pinnacle.c + SRC += drivers/sensors/cirque_pinnacle_gestures.c + SRC += $(QUANTUM_DIR)/pointing_device_gestures.c QUANTUM_LIB_SRC += spi_master.c else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), pimoroni_trackball) OPT_DEFS += -DSTM32_SPI -DHAL_USE_I2C=TRUE -- cgit v1.2.1 From 3c58f989295e17d03b66db9a154e02cde7336ece Mon Sep 17 00:00:00 2001 From: Stefan Kerkmann Date: Thu, 14 Jul 2022 11:50:00 +0200 Subject: [Core] PMW33XX drivers overhaul (#17613) * PMW33XX drivers overhaul This combines the PMW3389 and PM3360 drivers as they only differ in the firmware blobs and CPI get and set functions. The following changes have been made: * PMW3389 now gets the same multi-sensor feature that is already available on the PMW3360. * Introduced a shared pmw33xx_report_t struct is now directly readable via SPI transactions instead of individual byte-sized reads, saving multiple copies and bitshift operations. * pmw33(89/60)_get_report functions had unreachable branches in their motion detection logic these have been simplied as much as possible. * The fast firmware upload option has been removed as this becomes obsolete by the newly introduced polled waiting functions for ChibiOS polled waiting * PMW33(60/89)_SPI_LSBFIRST and PMW33(60/89)_SPI_MODE config options have been removed as they don't need to be configurable. * All PMW3389 and PMW3360 defines have been unified to a PMW33XX prefix to reduce code duplication and make the defines interchangeable * Adjust keyboards to PMW33XX naming scheme --- builddefs/common_features.mk | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'builddefs/common_features.mk') diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index 01dbdc3330..d7a00ba944 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -161,11 +161,9 @@ ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes) else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), pimoroni_trackball) OPT_DEFS += -DSTM32_SPI -DHAL_USE_I2C=TRUE QUANTUM_LIB_SRC += i2c_master.c - 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) + else ifneq ($(filter $(strip $(POINTING_DEVICE_DRIVER)),pmw3360 pmw3389),) OPT_DEFS += -DSTM32_SPI -DHAL_USE_SPI=TRUE + SRC += drivers/sensors/pmw33xx_common.c QUANTUM_LIB_SRC += spi_master.c endif endif -- cgit v1.2.1 From 12eb6444c67456d522c815120de8eed431ead2f8 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Tue, 19 Jul 2022 17:46:22 -0700 Subject: Add support for PAW3204 Optical Sensor (#17669) Co-authored-by: gompa Co-authored-by: Stefan Kerkmann --- builddefs/common_features.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builddefs/common_features.mk') diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index d7a00ba944..9ee51149ef 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -126,7 +126,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 pmw3389 pimoroni_trackball custom +VALID_POINTING_DEVICE_DRIVER_TYPES := adns5050 adns9800 analog_joystick cirque_pinnacle_i2c cirque_pinnacle_spi paw3204 pmw3360 pmw3389 pimoroni_trackball custom ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes) ifeq ($(filter $(POINTING_DEVICE_DRIVER),$(VALID_POINTING_DEVICE_DRIVER_TYPES)),) $(call CATASTROPHIC_ERROR,Invalid POINTING_DEVICE_DRIVER,POINTING_DEVICE_DRIVER="$(POINTING_DEVICE_DRIVER)" is not a valid pointing device type) -- cgit v1.2.1 From ee17ffadea41241fc2b397e0bbea8903591dd21c Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Wed, 20 Jul 2022 09:32:00 -0700 Subject: Move Pointing Device code to a subdirectory (#17684) --- builddefs/common_features.mk | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'builddefs/common_features.mk') diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index 9ee51149ef..8d31f694a7 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -133,8 +133,9 @@ ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes) else OPT_DEFS += -DPOINTING_DEVICE_ENABLE MOUSE_ENABLE := yes - SRC += $(QUANTUM_DIR)/pointing_device.c - SRC += $(QUANTUM_DIR)/pointing_device_drivers.c + VPATH += $(QUANTUM_DIR)/pointing_device + SRC += $(QUANTUM_DIR)/pointing_device/pointing_device.c + SRC += $(QUANTUM_DIR)/pointing_device/pointing_device_drivers.c ifneq ($(strip $(POINTING_DEVICE_DRIVER)), custom) SRC += drivers/sensors/$(strip $(POINTING_DEVICE_DRIVER)).c OPT_DEFS += -DPOINTING_DEVICE_DRIVER_$(strip $(shell echo $(POINTING_DEVICE_DRIVER) | tr '[:lower:]' '[:upper:]')) @@ -150,13 +151,13 @@ ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes) OPT_DEFS += -DSTM32_I2C -DHAL_USE_I2C=TRUE SRC += drivers/sensors/cirque_pinnacle.c SRC += drivers/sensors/cirque_pinnacle_gestures.c - SRC += $(QUANTUM_DIR)/pointing_device_gestures.c + SRC += $(QUANTUM_DIR)/pointing_device/pointing_device_gestures.c QUANTUM_LIB_SRC += i2c_master.c else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), cirque_pinnacle_spi) OPT_DEFS += -DSTM32_SPI -DHAL_USE_SPI=TRUE SRC += drivers/sensors/cirque_pinnacle.c SRC += drivers/sensors/cirque_pinnacle_gestures.c - SRC += $(QUANTUM_DIR)/pointing_device_gestures.c + SRC += $(QUANTUM_DIR)/pointing_device/pointing_device_gestures.c QUANTUM_LIB_SRC += spi_master.c else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), pimoroni_trackball) OPT_DEFS += -DSTM32_SPI -DHAL_USE_I2C=TRUE -- cgit v1.2.1 From aed82bc6a07ab72a3bec7b4b578b6cb644a92d51 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 12 Aug 2022 18:04:02 -0700 Subject: Move Encoder+Encoder Map from generic features (#18018) --- builddefs/common_features.mk | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'builddefs/common_features.mk') diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index 8d31f694a7..1f1f945760 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -893,3 +893,11 @@ ifeq ($(strip $(BLUETOOTH_ENABLE)), yes) QUANTUM_LIB_SRC += uart.c endif endif + +ifeq ($(strip $(ENCODER_ENABLE)), yes) + COMMON_VPATH += $(QUANTUM_DIR)/encoder.c + OPT_DEFS += -DENCODER_ENABLE + ifeq ($(strip $(ENCODER_MAP_ENABLE)), yes) + OPT_DEFS += -DENCODER_MAP_ENABLE + endif +endif -- cgit v1.2.1 From 3d248450161b96fcfad5f04e3d278e7d48489321 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 12 Aug 2022 19:55:59 -0700 Subject: [Bug] Fix wrong varaible in encoder block (#18020) --- builddefs/common_features.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builddefs/common_features.mk') diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index 1f1f945760..755a1735e0 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -895,7 +895,7 @@ ifeq ($(strip $(BLUETOOTH_ENABLE)), yes) endif ifeq ($(strip $(ENCODER_ENABLE)), yes) - COMMON_VPATH += $(QUANTUM_DIR)/encoder.c + SRC += $(QUANTUM_DIR)/encoder.c OPT_DEFS += -DENCODER_ENABLE ifeq ($(strip $(ENCODER_MAP_ENABLE)), yes) OPT_DEFS += -DENCODER_MAP_ENABLE -- cgit v1.2.1 From a02aff9c77c15ca9e248f84b09a88386a8f4b0a6 Mon Sep 17 00:00:00 2001 From: lokher Date: Sat, 13 Aug 2022 21:39:06 +0800 Subject: Add led matrix support for CKLED2001 (#17643) --- builddefs/common_features.mk | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'builddefs/common_features.mk') diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index 755a1735e0..a23b5e82b9 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -332,7 +332,7 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) endif LED_MATRIX_ENABLE ?= no -VALID_LED_MATRIX_TYPES := IS31FL3731 IS31FL3742A IS31FL3743A IS31FL3745 IS31FL3746A custom +VALID_LED_MATRIX_TYPES := IS31FL3731 IS31FL3742A IS31FL3743A IS31FL3745 IS31FL3746A CKLED2001 custom # TODO: IS31FL3733 IS31FL3737 IS31FL3741 ifeq ($(strip $(LED_MATRIX_ENABLE)), yes) @@ -388,6 +388,13 @@ endif QUANTUM_LIB_SRC += i2c_master.c endif + ifeq ($(strip $(LED_MATRIX_DRIVER)), CKLED2001) + OPT_DEFS += -DCKLED2001 -DSTM32_I2C -DHAL_USE_I2C=TRUE + COMMON_VPATH += $(DRIVER_PATH)/led + SRC += ckled2001-simple.c + QUANTUM_LIB_SRC += i2c_master.c + endif + endif RGB_MATRIX_ENABLE ?= no -- cgit v1.2.1 From fce99f38757d7ddbcaada0f5f0157ca24b6162b7 Mon Sep 17 00:00:00 2001 From: Mega Mind <68985133+megamind4089@users.noreply.github.com> Date: Sun, 14 Aug 2022 19:27:26 +0800 Subject: [Controller] Added board config for custom controller STeMCell (#16287) Co-authored-by: Mariappan Ramasamy <947300+Mariappan@users.noreply.github.com> Co-authored-by: Mariappan Ramasamy Co-authored-by: Sadek Baroudi --- builddefs/common_features.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builddefs/common_features.mk') diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index a23b5e82b9..3d416773f7 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -212,7 +212,7 @@ else 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)),) + ifneq ($(filter STM32F3xx_% STM32F1xx_% STM32F4xx_% %_STM32F401xC %_STM32F401xE %_STM32F405xG %_STM32F411xE %_STM32F072xB %_STM32F042x6 %_GD32VF103xB %_GD32VF103x8, $(MCU_SERIES)_$(MCU_LDSCRIPT)),) # Emulated EEPROM OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_STM32_FLASH_EMULATED COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/flash -- cgit v1.2.1 From 4da34828720d6daa9fd45d811129370cf11ba874 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sun, 14 Aug 2022 09:18:59 -0700 Subject: Fix Emulated EEPROM issue with F466 (#18039) --- builddefs/common_features.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builddefs/common_features.mk') diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index 3d416773f7..a23b5e82b9 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -212,7 +212,7 @@ else ifeq ($(PLATFORM),AVR) # Automatically provided by avr-libc, nothing required else ifeq ($(PLATFORM),CHIBIOS) - ifneq ($(filter STM32F3xx_% STM32F1xx_% STM32F4xx_% %_STM32F401xC %_STM32F401xE %_STM32F405xG %_STM32F411xE %_STM32F072xB %_STM32F042x6 %_GD32VF103xB %_GD32VF103x8, $(MCU_SERIES)_$(MCU_LDSCRIPT)),) + ifneq ($(filter STM32F3xx_% STM32F1xx_% %_STM32F401xC %_STM32F401xE %_STM32F405xG %_STM32F411xE %_STM32F072xB %_STM32F042x6 %_GD32VF103xB %_GD32VF103x8, $(MCU_SERIES)_$(MCU_LDSCRIPT)),) # Emulated EEPROM OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_STM32_FLASH_EMULATED COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/flash -- cgit v1.2.1