Add Pullup to uart RX pin

This commit is contained in:
Mario Hüttel 2020-06-21 01:29:50 +02:00
parent 49927a25cf
commit cced874460

View File

@ -74,6 +74,9 @@ static inline void uart_gpio_config(void)
SHELL_UART_PORT->MODER |= ALTFUNC(SHELL_UART_RX_PIN) | ALTFUNC(SHELL_UART_TX_PIN);
SETAF(SHELL_UART_PORT, SHELL_UART_RX_PIN, SHELL_UART_RX_PIN_ALTFUNC);
SETAF(SHELL_UART_PORT, SHELL_UART_TX_PIN, SHELL_UART_TX_PIN_ALTFUNC);
/* Setup Pullup resistor at UART RX */
SHELL_UART_PORT->PUPDR |= PULLUP(SHELL_UART_RX_PIN);
#endif
}