Merge pull request #4024 from charlown/master

fix rx gpio_mode_set param in drv_usart.c
This commit is contained in:
Bernard Xiong 2020-12-31 08:37:11 +08:00 committed by GitHub
commit a129257624
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -131,7 +131,7 @@ void gd32_uart_gpio_init(struct gd32_uart *uart)
/* connect port to USARTx_Rx */ /* connect port to USARTx_Rx */
gpio_af_set(uart->rx_port, uart->rx_af, uart->rx_pin); 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); gpio_output_options_set(uart->rx_port, GPIO_OTYPE_PP, GPIO_OSPEED_10MHZ, uart->rx_pin);
NVIC_SetPriority(uart->irqn, 0); NVIC_SetPriority(uart->irqn, 0);