summaryrefslogtreecommitdiff
path: root/platforms
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2024-03-02 18:20:47 +0000
committerQMK Bot <hello@qmk.fm>2024-03-02 18:20:47 +0000
commit73c4ca175bfdca9bdee31a789380991903efd617 (patch)
tree6f757c0f4b1b31ab7bdfda6ee6f8bf76be5e3c6f /platforms
parent569b0c70beceb1bbd2b2c5e9cc4f0ff9209995f3 (diff)
parent092ef661af1f970122993ad175bcc420898788ca (diff)
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'platforms')
-rw-r--r--platforms/chibios/chibios_config.h5
-rw-r--r--platforms/chibios/drivers/uart_sio.c2
-rw-r--r--platforms/chibios/platform.mk11
3 files changed, 6 insertions, 12 deletions
diff --git a/platforms/chibios/chibios_config.h b/platforms/chibios/chibios_config.h
index 759ac6943b..8f46fe0736 100644
--- a/platforms/chibios/chibios_config.h
+++ b/platforms/chibios/chibios_config.h
@@ -108,6 +108,11 @@
108# if defined(STM32F1XX) || defined(STM32F2XX) || defined(STM32F4XX) || defined(STM32L1XX) 108# if defined(STM32F1XX) || defined(STM32F2XX) || defined(STM32F4XX) || defined(STM32L1XX)
109# define USE_I2CV1 109# define USE_I2CV1
110# endif 110# endif
111
112# if defined(STM32G0XX) || defined(STM32G4XX) || defined(STM32L5XX) || defined(STM32H7XX)
113# define USE_USARTV3
114# endif
115
111#endif 116#endif
112 117
113// GD32 compatibility 118// GD32 compatibility
diff --git a/platforms/chibios/drivers/uart_sio.c b/platforms/chibios/drivers/uart_sio.c
index ebf51ae5a8..442df1c54d 100644
--- a/platforms/chibios/drivers/uart_sio.c
+++ b/platforms/chibios/drivers/uart_sio.c
@@ -16,7 +16,7 @@ static SIOConfig sioConfig = {
16#else 16#else
17static SIOConfig sioConfig = { 17static SIOConfig sioConfig = {
18 .baud = SIO_DEFAULT_BITRATE, 18 .baud = SIO_DEFAULT_BITRATE,
19# if defined(MCU_STM32) && defined(CHIBIOS_HAL_USARTv3) 19# if defined(MCU_STM32) && defined(USE_USARTV3)
20 .presc = USART_PRESC1, 20 .presc = USART_PRESC1,
21# endif 21# endif
22 .cr1 = UART_CR1, 22 .cr1 = UART_CR1,
diff --git a/platforms/chibios/platform.mk b/platforms/chibios/platform.mk
index a2178412f3..f38a888012 100644
--- a/platforms/chibios/platform.mk
+++ b/platforms/chibios/platform.mk
@@ -330,17 +330,6 @@ ifeq ($(strip $(USE_CHIBIOS_CONTRIB)),yes)
330endif 330endif
331 331
332# 332#
333# Extract supported HAL drivers
334##############################################################################
335
336define add_lld_driver_define
337 $(eval driver := $(word 2,$(subst /LLD/, ,$(1))))
338 $(eval OPT_DEFS += -DCHIBIOS_HAL_$(driver))
339endef
340
341$(foreach dir,$(EXTRAINCDIRS),$(if $(findstring /LLD/,$(dir)),$(call add_lld_driver_define,$(dir))))
342
343#
344# Project, sources and paths 333# Project, sources and paths
345############################################################################## 334##############################################################################
346 335