Fix flip-ee DFU build target accidentally erasing the target FLASH memory space.
[pub/USBasp.git] / LUFA / Drivers / USB / Class / Device / MIDIClassDevice.c
index c9553a4..5defa14 100644 (file)
@@ -59,7 +59,10 @@ void MIDI_Device_USBTask(USB_ClassInfo_MIDI_Device_t* const MIDIInterfaceInfo)
          return;
 
        #if !defined(NO_CLASS_DRIVER_AUTOFLUSH)
          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
 }
 
        #endif
 }