From 0acc136039fd1de72b276be6130a66551e546823 Mon Sep 17 00:00:00 2001 From: Karel Gardas Date: Fri, 1 Apr 2022 18:14:11 +0200 Subject: bsp/stm32h7: add configuration for USART1 GPIO pins, registers and alternate function --- bsps/arm/stm32h7/console/console-usart1-cfg.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'bsps') diff --git a/bsps/arm/stm32h7/console/console-usart1-cfg.c b/bsps/arm/stm32h7/console/console-usart1-cfg.c index 47c13b2f54..d64d91ab30 100644 --- a/bsps/arm/stm32h7/console/console-usart1-cfg.c +++ b/bsps/arm/stm32h7/console/console-usart1-cfg.c @@ -31,15 +31,17 @@ #include +#include + const stm32h7_uart_config stm32h7_usart1_config = { .gpio = { - .regs = GPIOB, + .regs = STM32H7_USART1_GPIO_REGS, .config = { - .Pin = GPIO_PIN_14 | GPIO_PIN_15, + .Pin = STM32H7_USART1_GPIO_PINS, .Mode = GPIO_MODE_AF_PP, .Pull = GPIO_NOPULL, .Speed = GPIO_SPEED_FREQ_LOW, - .Alternate = GPIO_AF4_USART1 + .Alternate = STM32H7_USART1_ALT_FUNC } }, .irq = USART1_IRQn, -- cgit v1.2.3