51#define UART0_BAUD 115200ul
52#define UART0_UBBR_VAL ((F_CPU / (UART0_BAUD * 16)) - 1)
57 UBRR0 = UART0_UBBR_VAL;
59 UCSR0C = (0 << USBS0) | (1 << UCSZ01) | (1 << UCSZ00);
62 UCSR0B = (1 << RXEN0) | (1 << TXEN0);
65void uart_send_byte(uint8_t data)
68 while((UCSR0A & (1 << UDRE0)) == 0) {;}
73uint8_t uart_receive_byte(
void)
76 while((UCSR0A & (1 << RXC0)) == 0) {;}
102 data = uart_receive_byte();
103 uart_send_byte(data);
void px_board_init(void)
Initialise the board hardware.