Fix code repetition
This commit is contained in:
@@ -34,7 +34,7 @@ char USART_GetChar(void)
|
||||
{
|
||||
unsigned char newtail;
|
||||
|
||||
if (rxhead == rxtail) {
|
||||
if (!USART_IsDataAvailable()) {
|
||||
return '\0'; // Non-blocking
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user