Fixed SerialStream driver blocking while waiting for characters to be received instea...
[pub/USBasp.git] / LUFA / Drivers / Peripheral / SerialStream.c
index fd5676a..4ae0a7f 100644 (file)
@@ -44,6 +44,9 @@ static int SerialStream_TxByte(char DataByte, FILE *Stream)
 static int SerialStream_RxByte(FILE *Stream)\r
 {\r
        (void)Stream;\r
+       \r
+       if (!(Serial_IsCharReceived()))\r
+         return EOF;\r
 \r
        return Serial_RxByte();\r
 }\r