Break device mode class driver interfaces into seperate config and state structs...
[pub/USBasp.git] / Demos / Device / ClassDriver / MIDI / MIDI.c
index 511f280..3dca743 100644 (file)
  *  passed to all MIDI Class driver functions, so that multiple instances of the same class\r
  *  within a device can be differentiated from one another.\r
  */\r
-USB_ClassInfo_MIDI_t Keyboard_MIDI_Interface =\r
+USB_ClassInfo_MIDI_Device_t Keyboard_MIDI_Interface =\r
        {\r
-               .StreamingInterfaceNumber = 1,\r
+               .Config =\r
+                       {\r
+                               .StreamingInterfaceNumber = 1,\r
 \r
-               .DataINEndpointNumber     = MIDI_STREAM_IN_EPNUM,\r
-               .DataINEndpointSize       = MIDI_STREAM_EPSIZE,\r
+                               .DataINEndpointNumber     = MIDI_STREAM_IN_EPNUM,\r
+                               .DataINEndpointSize       = MIDI_STREAM_EPSIZE,\r
 \r
-               .DataOUTEndpointNumber    = MIDI_STREAM_OUT_EPNUM,\r
-               .DataOUTEndpointSize      = MIDI_STREAM_EPSIZE,\r
+                               .DataOUTEndpointNumber    = MIDI_STREAM_OUT_EPNUM,\r
+                               .DataOUTEndpointSize      = MIDI_STREAM_EPSIZE,\r
+                       },\r
+                       \r
+               .State =\r
+                       {\r
+                               // Leave all state values to their defaults                     \r
+                       }\r
        };\r
 \r
 /** Main program entry point. This routine contains the overall program flow, including initial\r