From: Dean Camera Date: Fri, 5 Feb 2010 03:59:42 +0000 (+0000) Subject: Fixed SerialStream driver blocking while waiting for characters to be received instea... X-Git-Tag: LUFA-110528-BETA~615 X-Git-Url: http://git.linex4red.de/pub/USBasp.git/commitdiff_plain/6ba0b860ccd1a1f91fd25e4dc1ee162e9eb710ab Fixed SerialStream driver blocking while waiting for characters to be received instead of returning EOF. --- diff --git a/LUFA/Drivers/Peripheral/SerialStream.c b/LUFA/Drivers/Peripheral/SerialStream.c index fd5676aab..4ae0a7f16 100644 --- a/LUFA/Drivers/Peripheral/SerialStream.c +++ b/LUFA/Drivers/Peripheral/SerialStream.c @@ -44,6 +44,9 @@ static int SerialStream_TxByte(char DataByte, FILE *Stream) static int SerialStream_RxByte(FILE *Stream) { (void)Stream; + + if (!(Serial_IsCharReceived())) + return EOF; return Serial_RxByte(); } diff --git a/LUFA/ManPages/ChangeLog.txt b/LUFA/ManPages/ChangeLog.txt index 521ab38f9..5fd1b2ba4 100644 --- a/LUFA/ManPages/ChangeLog.txt +++ b/LUFA/ManPages/ChangeLog.txt @@ -53,6 +53,7 @@ * - Fixed Pipe_IsEndpointBound() not taking the endpoint's direction into account * - Fixed EEPROM and FLASH ISP programming in the AVRISP project * - Fixed incorrect values of USB_CONFIG_ATTR_SELFPOWERED and USB_CONFIG_ATTR_REMOTEWAKEUP tokens (thanks to Claus Christensen) + * - Fixed SerialStream driver blocking while waiting for characters to be received instead of returning EOF * * \section Sec_ChangeLog091223 Version 091223 *