diff options
author | Joel Challis <git@zvecr.com> | 2020-01-24 13:50:51 +0000 |
---|---|---|
committer | Florian Didron <fdidron@users.noreply.github.com> | 2020-02-26 10:15:12 +0900 |
commit | cc9befe283b02ad591043e6992d59c717fc8d61e (patch) | |
tree | 9d07d1f36473801aff55761b1dae8e9177557be4 | |
parent | ebd4b1dc1e9ae56d47c41ae896c5a72a749ed0fa (diff) |
Update split serial code to use driver pattern (#7990)
* Move avr serial code to drivers
* Update src+= serial.c to driver pattern
-rw-r--r-- | common_features.mk | 10 | ||||
-rw-r--r-- | drivers/avr/serial.c (renamed from quantum/split_common/serial.c) | 0 | ||||
-rw-r--r-- | drivers/avr/serial.h (renamed from quantum/split_common/serial.h) | 0 |
3 files changed, 8 insertions, 2 deletions
diff --git a/common_features.mk b/common_features.mk index e40317c7ee..c246094bca 100644 --- a/common_features.mk +++ b/common_features.mk @@ -475,9 +475,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 index c4ef2a97e7..c4ef2a97e7 100644 --- a/quantum/split_common/serial.c +++ b/drivers/avr/serial.c diff --git a/quantum/split_common/serial.h b/drivers/avr/serial.h index 53e66cf905..53e66cf905 100644 --- a/quantum/split_common/serial.h +++ b/drivers/avr/serial.h |