Test command parser state machine
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user