Fixed incorrect comparison in the descriptor callback routine of the TeensyHID bootlo...
[pub/USBasp.git] / LUFA / Drivers / Peripheral / SerialStream.c
index fd5676a..867160a 100644 (file)
@@ -28,7 +28,7 @@
   this software.\r
 */\r
 \r
-#define  INCLUDE_FROM_SERIALSTREAM_C\r
+#define  __INCLUDE_FROM_SERIALSTREAM_C\r
 #include "SerialStream.h"\r
 \r
 FILE USARTStream = FDEV_SETUP_STREAM(SerialStream_TxByte, SerialStream_RxByte, _FDEV_SETUP_RW);\r
@@ -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 _FDEV_EOF;\r
 \r
        return Serial_RxByte();\r
 }\r