Skip to content

Instantly share code, notes, and snippets.

@raghavendrahassy
Created April 21, 2016 08:51
Show Gist options
  • Save raghavendrahassy/1a966b7524b57000b2d7e77848ff07fe to your computer and use it in GitHub Desktop.
Save raghavendrahassy/1a966b7524b57000b2d7e77848ff07fe to your computer and use it in GitHub Desktop.
unsigned char USART_Receive( void )
{
/* Wait for data to be received */
while ( !(UCSR0A & (1<<RXC)) )
;
/* Get and return received data from buffer */
return UDR0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment