diff options
| author | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2009-08-31 12:43:28 +0000 |
|---|---|---|
| committer | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2009-08-31 12:43:28 +0000 |
| commit | 9be94de5d954c8e916f414f2243122cb1bb3015a (patch) | |
| tree | 77b16f5d7549c309950e0c0b9eadc527382ba613 /LUFA/Drivers/USB | |
| parent | 0d4b809c81a064167874a7886f7fb0468e3a187f (diff) | |
Add extra check for OUT ZLP in the CDC Device Class driver service task to quickly clear zero-length termination packets from the host.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@800 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'LUFA/Drivers/USB')
| -rw-r--r-- | LUFA/Drivers/USB/Class/Device/CDC.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/LUFA/Drivers/USB/Class/Device/CDC.c b/LUFA/Drivers/USB/Class/Device/CDC.c index 31fd8f1b..816a5f13 100644 --- a/LUFA/Drivers/USB/Class/Device/CDC.c +++ b/LUFA/Drivers/USB/Class/Device/CDC.c @@ -118,6 +118,11 @@ void CDC_Device_USBTask(USB_ClassInfo_CDC_Device_t* CDCInterfaceInfo) if ((USB_DeviceState != DEVICE_STATE_Configured) || !(CDCInterfaceInfo->State.LineEncoding.BaudRateBPS))
return;
+ Endpoint_SelectEndpoint(CDCInterfaceInfo->Config.DataOUTEndpointNumber);
+
+ if (Endpoint_IsOUTReceived() && !(Endpoint_BytesInEndpoint()))
+ Endpoint_ClearOUT();
+
CDC_Device_Flush(CDCInterfaceInfo);
}
|
