From 61fa6949fbb537f54d48a4fc0218ff2b6873e940 Mon Sep 17 00:00:00 2001 From: Stefan Kerkmann Date: Tue, 20 Feb 2024 11:34:24 +0100 Subject: [Core] Allow ChibiOS `SIO` driver for `UART` driver (#22839) * onekey: stm32f3_disco: add usart pins and activate peripheral Signed-off-by: Stefan Kerkmann * chibios: uart: change SD1 prefix to UART Signed-off-by: Stefan Kerkmann * chibios: uart: add SIO driver and RP2040 compatibility Signed-off-by: Stefan Kerkmann Co-authored-by: Sergey Vlasov * Update platforms/chibios/drivers/uart.h Co-authored-by: Joel Challis --------- Signed-off-by: Stefan Kerkmann Co-authored-by: Sergey Vlasov Co-authored-by: Joel Challis --- builddefs/common_features.mk | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'builddefs') diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index 58e41f5230..7227a5558e 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -960,6 +960,15 @@ ifeq ($(strip $(SPI_DRIVER_REQUIRED)), yes) endif ifeq ($(strip $(UART_DRIVER_REQUIRED)), yes) - OPT_DEFS += -DHAL_USE_SERIAL=TRUE - QUANTUM_LIB_SRC += uart.c + ifeq ($(strip $(PLATFORM)), CHIBIOS) + ifneq ($(filter $(MCU_SERIES),RP2040),) + OPT_DEFS += -DHAL_USE_SIO=TRUE + QUANTUM_LIB_SRC += uart_sio.c + else + OPT_DEFS += -DHAL_USE_SERIAL=TRUE + QUANTUM_LIB_SRC += uart_serial.c + endif + else + QUANTUM_LIB_SRC += uart.c + endif endif -- cgit v1.2.3