summaryrefslogtreecommitdiff
path: root/builddefs
diff options
context:
space:
mode:
authorStefan Kerkmann <karlk90@pm.me>2024-02-20 11:34:24 +0100
committerGitHub <noreply@github.com>2024-02-20 11:34:24 +0100
commit61fa6949fbb537f54d48a4fc0218ff2b6873e940 (patch)
tree400f8f4920888097c0e22c68cb5fa742b0e340c8 /builddefs
parent865a8f42a6128dfc09a24fe749b0d78d8c69b70e (diff)
[Core] Allow ChibiOS `SIO` driver for `UART` driver (#22839)
* onekey: stm32f3_disco: add usart pins and activate peripheral Signed-off-by: Stefan Kerkmann <karlk90@pm.me> * chibios: uart: change SD1 prefix to UART Signed-off-by: Stefan Kerkmann <karlk90@pm.me> * chibios: uart: add SIO driver and RP2040 compatibility Signed-off-by: Stefan Kerkmann <karlk90@pm.me> Co-authored-by: Sergey Vlasov <sigprof@gmail.com> * Update platforms/chibios/drivers/uart.h Co-authored-by: Joel Challis <git@zvecr.com> --------- Signed-off-by: Stefan Kerkmann <karlk90@pm.me> Co-authored-by: Sergey Vlasov <sigprof@gmail.com> Co-authored-by: Joel Challis <git@zvecr.com>
Diffstat (limited to 'builddefs')
-rw-r--r--builddefs/common_features.mk13
1 files changed, 11 insertions, 2 deletions
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)
960endif 960endif
961 961
962ifeq ($(strip $(UART_DRIVER_REQUIRED)), yes) 962ifeq ($(strip $(UART_DRIVER_REQUIRED)), yes)
963 OPT_DEFS += -DHAL_USE_SERIAL=TRUE 963 ifeq ($(strip $(PLATFORM)), CHIBIOS)
964 QUANTUM_LIB_SRC += uart.c 964 ifneq ($(filter $(MCU_SERIES),RP2040),)
965 OPT_DEFS += -DHAL_USE_SIO=TRUE
966 QUANTUM_LIB_SRC += uart_sio.c
967 else
968 OPT_DEFS += -DHAL_USE_SERIAL=TRUE
969 QUANTUM_LIB_SRC += uart_serial.c
970 endif
971 else
972 QUANTUM_LIB_SRC += uart.c
973 endif
965endif 974endif