From e4a0f841e19b4ddf86711cf79dc521d2f6f5e4ae Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Fri, 24 Jan 2020 13:50:51 +0000 Subject: [PATCH] Update split serial code to use driver pattern (#7990) * Move avr serial code to drivers * Update src+= serial.c to driver pattern --- common_features.mk | 10 ++++++++-- {quantum/split_common => drivers/avr}/serial.c | 0 {quantum/split_common => drivers/avr}/serial.h | 0 3 files changed, 8 insertions(+), 2 deletions(-) rename {quantum/split_common => drivers/avr}/serial.c (100%) rename {quantum/split_common => drivers/avr}/serial.h (100%) diff --git a/common_features.mk b/common_features.mk index 900b27c46..a431923bc 100644 --- a/common_features.mk +++ b/common_features.mk @@ -469,9 +469,15 @@ ifeq ($(strip $(SPLIT_KEYBOARD)), yes) QUANTUM_SRC += $(QUANTUM_DIR)/split_common/transport.c # 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. - QUANTUM_LIB_SRC += $(QUANTUM_DIR)/split_common/serial.c \ - i2c_master.c \ + QUANTUM_LIB_SRC += i2c_master.c \ i2c_slave.c + + SERIAL_DRIVER ?= bitbang + ifeq ($(strip $(SERIAL_DRIVER)), bitbang) + QUANTUM_LIB_SRC += serial.c + else + QUANTUM_LIB_SRC += serial_$(strip $(SERIAL_DRIVER)).c + endif endif COMMON_VPATH += $(QUANTUM_PATH)/split_common endif diff --git a/quantum/split_common/serial.c b/drivers/avr/serial.c similarity index 100% rename from quantum/split_common/serial.c rename to drivers/avr/serial.c diff --git a/quantum/split_common/serial.h b/drivers/avr/serial.h similarity index 100% rename from quantum/split_common/serial.h rename to drivers/avr/serial.h