Oops - typos in the naming of the NBUSYBK0 bits breaking the new busy bank counting...
[pub/lufa.git] / LUFA / Drivers / USB / Class / Host / MIDI.c
index 4483b50..6aed766 100644 (file)
@@ -3,7 +3,7 @@
      Copyright (C) Dean Camera, 2010.
 
   dean [at] fourwalledcubicle [dot] com
-      www.fourwalledcubicle.com
+           www.lufa-lib.org
 */
 
 /*
@@ -110,9 +110,9 @@ static uint8_t DCOMP_MIDI_Host_NextMIDIStreamingInterface(void* const CurrentDes
                USB_Descriptor_Interface_t* CurrentInterface = DESCRIPTOR_PCAST(CurrentDescriptor,
                                                                                USB_Descriptor_Interface_t);
 
-               if ((CurrentInterface->Class    == MIDI_STREAMING_CLASS)    &&
-                   (CurrentInterface->SubClass == MIDI_STREAMING_SUBCLASS) &&
-                   (CurrentInterface->Protocol == MIDI_STREAMING_PROTOCOL))
+               if ((CurrentInterface->Class    == AUDIO_CSCP_AudioClass)            &&
+                   (CurrentInterface->SubClass == AUDIO_CSCP_MIDIStreamingSubclass) &&
+                   (CurrentInterface->Protocol == AUDIO_CSCP_StreamingProtocol))
                {
                        return DESCRIPTOR_SEARCH_Found;
                }
@@ -141,6 +141,16 @@ static uint8_t DCOMP_MIDI_Host_NextMIDIStreamingDataEndpoint(void* const Current
        return DESCRIPTOR_SEARCH_NotFound;
 }
 
+void MIDI_Host_USBTask(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceInfo)
+{
+       if ((USB_HostState != HOST_STATE_Configured) || !(MIDIInterfaceInfo->State.IsActive))
+         return;
+
+       #if !defined(NO_CLASS_DRIVER_AUTOFLUSH)
+       MIDI_Host_Flush(MIDIInterfaceInfo);
+       #endif  
+}
+
 uint8_t MIDI_Host_Flush(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceInfo)
 {
        if ((USB_HostState != HOST_STATE_Configured) || !(MIDIInterfaceInfo->State.IsActive))