+uint8_t MIDI_Host_Flush(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceInfo)\r
+{\r
+ if (USB_HostState != HOST_STATE_Configured)\r
+ return PIPE_RWSTREAM_DeviceDisconnected;\r
+ \r
+ uint8_t ErrorCode;\r
+\r
+ Pipe_SelectPipe(MIDIInterfaceInfo->Config.DataOUTPipeNumber);\r
+\r
+ if (Pipe_BytesInPipe())\r
+ {\r
+ Pipe_ClearOUT();\r
+\r
+ if ((ErrorCode = Pipe_WaitUntilReady()) != PIPE_READYWAIT_NoError)\r
+ return ErrorCode;\r
+ }\r
+\r
+ return PIPE_READYWAIT_NoError;\r
+}\r
+\r