[demo][stm32f405rg] update uart driver.

This commit is contained in:
armink 2020-06-26 22:59:44 +08:00
parent e2e373028b
commit af6a660f36
1 changed files with 1 additions and 9 deletions

View File

@ -281,15 +281,6 @@ static long stm32_gpio_configure(struct stm32_uart_config *config)
return 0;
}
void HAL_UART_MspInit(UART_HandleTypeDef *huart)
{
/* if this uart is shell function */
if(huart == &handle)
{
stm32_gpio_configure(_uart_config);
}
}
static long stm32_configure(struct stm32_uart_config *config)
{
stm32_uart_clk_enable(config);
@ -314,6 +305,7 @@ static long stm32_configure(struct stm32_uart_config *config)
int rt_hw_usart_init(void)
{
_uart_config = &uart_config[0];
stm32_gpio_configure(_uart_config);
stm32_configure(_uart_config);
return 0;