Update split serial code to use driver pattern (#7990)

* Move avr serial code to drivers

* Update src+= serial.c to driver pattern
refactor_process_record_kb_user 0.7.118
Joel Challis 5 years ago committed by GitHub
parent 4867a9b1e6
commit e4a0f841e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      common_features.mk
  2. 0
      drivers/avr/serial.c
  3. 0
      drivers/avr/serial.h

@ -469,9 +469,15 @@ ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
QUANTUM_SRC += $(QUANTUM_DIR)/split_common/transport.c 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. # 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. # 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 \ QUANTUM_LIB_SRC += i2c_master.c \
i2c_master.c \
i2c_slave.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 endif
COMMON_VPATH += $(QUANTUM_PATH)/split_common COMMON_VPATH += $(QUANTUM_PATH)/split_common
endif endif

Loading…
Cancel
Save