From 8711dc7ced0ed02a33a96222d86bd27f65c239ed Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Tue, 11 Aug 2009 01:52:15 +0000 Subject: Fix issue in CDC device class driver where received data the size of the data endpoint could lock up the driver. Further work on the new CDC and HID host mode class drivers. Reset changelog et. al. to reset development information for the new version currently under development. --- LUFA/Drivers/USB/Class/Device/CDC.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'LUFA/Drivers/USB/Class/Device/CDC.c') diff --git a/LUFA/Drivers/USB/Class/Device/CDC.c b/LUFA/Drivers/USB/Class/Device/CDC.c index 0d6b37850..47290ceb6 100644 --- a/LUFA/Drivers/USB/Class/Device/CDC.c +++ b/LUFA/Drivers/USB/Class/Device/CDC.c @@ -161,6 +161,9 @@ uint16_t CDC_Device_BytesReceived(USB_ClassInfo_CDC_Device_t* const CDCInterface { Endpoint_SelectEndpoint(CDCInterfaceInfo->Config.DataOUTEndpointNumber); + if (Endpoint_IsOUTReceived() && !(Endpoint_BytesInEndpoint())) + Endpoint_ClearOUT(); + return Endpoint_BytesInEndpoint(); } -- cgit v1.2.3