Add a bunch of stuff: Add baudrate reconfig command to shell and move the uart to separate C file

This commit is contained in:
2021-11-27 17:41:11 +01:00
parent 6b9b7d78a0
commit 96e0931c9f
13 changed files with 274 additions and 76 deletions

View File

@@ -6,7 +6,7 @@
void uart_init(void)
{
SHELL_UART_RCC_REG |= SHELL_UART_RCC_MASK;
SHELL_UART_PERIPH->BRR = SHELL_UART_BRR_REG_VALUE;
SHELL_UART_PERIPH->BRR = SHELL_UART_DEFAULT_BRR_REG_VALUE;
SHELL_UART_PERIPH->CR2 = 0;
SHELL_UART_PERIPH->CR3 = 0;
SHELL_UART_PERIPH->CR1 = USART_CR1_TE | USART_CR1_UE;