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') 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