Test command parser state machine

This commit is contained in:
2024-08-27 14:35:31 +02:00
parent 9638d10830
commit a2b77e8db6
3 changed files with 61 additions and 7 deletions

View File

@@ -20,6 +20,10 @@ void USART_Init(void)
rxhead = 0;
rxtail = 0;
// Handle RXC interrupt
UCSRB |= (1 << RXCIE);
sei();
UCSRB |= BIT(RXEN) | BIT(TXEN); // Enable rx and tx circuitry
UCSRC |= BIT(URSEL) | BIT(UCSZ0) | BIT(UCSZ1); // 8-bit chars
UBRRH = (USART_BAUD_PRESCALE >> 8); // Baud Rate upper byte