Fixed blocking CDC streams not aborting when the host is disconnected.

This commit is contained in:
Dean Camera committed 2010-01-04 00:14:09 +00:00
1 parent 58a39c6666
commit 71e5bcee3d
4 files changed
+9 -2

No files matched your search

+3
View File
@@ -263,6 +263,9 @@ static int CDC_Device_getchar_Blocking(FILE* Stream)
{
while (!(CDC_Device_BytesReceived((USB_ClassInfo_CDC_Device_t*)fdev_get_udata(Stream))))
{
if (USB_DeviceState == DEVICE_STATE_Unattached)
return _FDEV_EOF;
CDC_Device_USBTask((USB_ClassInfo_CDC_Device_t*)fdev_get_udata(Stream));
USB_USBTask();
}