mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-09-10 17:15:43 +00:00
Fixed lengthy timeouts in the USBtoSerial project if no application on the host is consuming data (thanks to Nicolas Saugnier).
Fixed lengthy automatic data flushing in the CDC and MIDI device class drivers.
This commit is contained in:
@@ -138,7 +138,10 @@ void CDC_Device_USBTask(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo)
|
||||
return;
|
||||
|
||||
#if !defined(NO_CLASS_DRIVER_AUTOFLUSH)
|
||||
CDC_Device_Flush(CDCInterfaceInfo);
|
||||
Endpoint_SelectEndpoint(CDCInterfaceInfo->Config.DataINEndpoint.Address);
|
||||
|
||||
if (Endpoint_IsINReady())
|
||||
CDC_Device_Flush(CDCInterfaceInfo);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -59,7 +59,10 @@ void MIDI_Device_USBTask(USB_ClassInfo_MIDI_Device_t* const MIDIInterfaceInfo)
|
||||
return;
|
||||
|
||||
#if !defined(NO_CLASS_DRIVER_AUTOFLUSH)
|
||||
MIDI_Device_Flush(MIDIInterfaceInfo);
|
||||
Endpoint_SelectEndpoint(MIDIInterfaceInfo->Config.DataINEndpoint.Address);
|
||||
|
||||
if (Endpoint_IsINReady())
|
||||
MIDI_Device_Flush(MIDIInterfaceInfo);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user