Ensure all USB device class drivers have the same three main functions as their inter...
[pub/lufa.git] / Demos / Device / MIDI / MIDI.c
index 4fef047..8881d1d 100644 (file)
@@ -64,6 +64,7 @@ int main(void)
        {\r
                CheckJoystickMovement();\r
        \r
+               USB_MIDI_USBTask(&Keyboard_MIDI_Interface);\r
                USB_USBTask();\r
        }\r
 }\r
@@ -168,3 +169,9 @@ void EVENT_USB_ConfigurationChanged(void)
        if (!(USB_MIDI_ConfigureEndpoints(&Keyboard_MIDI_Interface)))\r
          LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
 }\r
+\r
+/** Event handler for the library USB Unhandled Control Packet event. */\r
+void EVENT_USB_UnhandledControlPacket(void)\r
+{\r
+       USB_MIDI_ProcessControlPacket(&Keyboard_MIDI_Interface);\r
+}\r