void USART0_Transmit(unsigned char data){ // Wait for empty transmit buffer while(!(UCSR0A & (1 << UDRE0))); // Put data into buffer, sends the data UDR0 = data; } unsigned char USART0_Receive(void){ // Wait for data to be received while(!(UCSR0A & (1 << RXC0))); // Get and return received data from buffer return UDR0; }