X-Git-Url: http://git.linex4red.de/pub/lufa.git/blobdiff_plain/3e1f3869c1678fa89c40e9afef06efa2d7f24326..e186907e393939f1b417f0f7ba7406b46c76bece:/LUFA/Drivers/USB/Class/Device/MIDIClassDevice.c diff --git a/LUFA/Drivers/USB/Class/Device/MIDIClassDevice.c b/LUFA/Drivers/USB/Class/Device/MIDIClassDevice.c index c9553a413..5defa142a 100644 --- a/LUFA/Drivers/USB/Class/Device/MIDIClassDevice.c +++ b/LUFA/Drivers/USB/Class/Device/MIDIClassDevice.c @@ -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 }