19#include <util/setbaud.h>
37#warning "BAUD IS DEFINED"
39#warning "BAUD ISNT DEFINED"
48 UCSR0A |= (1 << U2X0);
50 UCSR0A &= ~(1 << U2X0);
54 UCSR0B = (1 << TXEN0) | (1 << RXEN0);
57 UCSR0C = (1 << UCSZ01) | (1 << UCSZ00);
73 loop_until_bit_is_set(UCSR0A, UDRE0);
90 loop_until_bit_is_set(UCSR0A, RXC0);
CPU configuration and definitions for ATmega168.
void printString(const char *String)
Sends a null-terminated string over USART.
void initUSART(void)
Initializes the USART peripheral.
uint8_t receiveByte(void)
Receives a single byte from USART.
void transmitByte(uint8_t data)
Transmits a single byte over USART.
USART serial communication interface.