summaryrefslogtreecommitdiff
path: root/builddefs
diff options
context:
space:
mode:
authorStefan Kerkmann <karlk90@pm.me>2022-06-18 00:04:17 +0200
committerGitHub <noreply@github.com>2022-06-18 08:04:17 +1000
commitfe680a8568d275732738b07166b8f8a950d1e282 (patch)
tree7bc27994919e1271c9f6effef2e5637442b3b02b /builddefs
parent6d67e9df4be6981de05517626c1a504da31abf16 (diff)
[Core] Split ChibiOS usart split driver in protocol and hardware driver part (#16669)
Diffstat (limited to 'builddefs')
-rw-r--r--builddefs/common_features.mk10
1 files changed, 9 insertions, 1 deletions
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