From 52081b3767e40a92afb284b4cf4a4a7fb982bd84 Mon Sep 17 00:00:00 2001 From: charlown Date: Sat, 14 Nov 2020 13:22:45 +0800 Subject: [PATCH] fix rx gpio_mode_set param in drv_usart.c Signed-off-by: charlown --- bsp/gd32e230k-start/drivers/drv_usart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsp/gd32e230k-start/drivers/drv_usart.c b/bsp/gd32e230k-start/drivers/drv_usart.c index c49684de4b..bf1f6b68a7 100644 --- a/bsp/gd32e230k-start/drivers/drv_usart.c +++ b/bsp/gd32e230k-start/drivers/drv_usart.c @@ -131,7 +131,7 @@ void gd32_uart_gpio_init(struct gd32_uart *uart) /* connect port to USARTx_Rx */ gpio_af_set(uart->rx_port, uart->rx_af, uart->rx_pin); - gpio_mode_set(uart->rx_port, GPIO_MODE_INPUT, GPIO_PUPD_NONE, uart->rx_pin); + gpio_mode_set(uart->rx_port, GPIO_MODE_AF, GPIO_PUPD_NONE, uart->rx_pin); gpio_output_options_set(uart->rx_port, GPIO_OTYPE_PP, GPIO_OSPEED_10MHZ, uart->rx_pin); NVIC_SetPriority(uart->irqn, 0);