stm32f0: usart: temporarily enable GPIOs
This commit is contained in:
parent
963b713d46
commit
4e9f1c77bf
1 changed files with 4 additions and 0 deletions
|
@ -155,6 +155,10 @@ static int usart_init(struct usart_console *console)
|
|||
rcc_periph_clock_enable(RCC_GPIOA);
|
||||
rcc_periph_clock_enable(RCC_USART1);
|
||||
|
||||
/* Set up GPIOs for user console (USART 1) */
|
||||
gpio_mode_setup(GPIOA, GPIO_MODE_AF, GPIO_PUPD_NONE, GPIO9 | GPIO10);
|
||||
gpio_set_af(GPIOA, GPIO_AF1, GPIO9 | GPIO10);
|
||||
|
||||
usart_set_baudrate(console->dev, 115200);
|
||||
usart_set_databits(console->dev, 8);
|
||||
usart_set_parity(console->dev, USART_PARITY_NONE);
|
||||
|
|
Loading…
Add table
Reference in a new issue