mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-09-10 17:15:43 +00:00
Add extra check for OUT ZLP in the CDC Device Class driver service task to quickly clear zero-length termination packets from the host.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user