summaryrefslogtreecommitdiffstats
path: root/protocol/lufa/descriptor.h
diff options
context:
space:
mode:
Diffstat (limited to 'protocol/lufa/descriptor.h')
-rw-r--r--protocol/lufa/descriptor.h36
1 files changed, 35 insertions, 1 deletions
diff --git a/protocol/lufa/descriptor.h b/protocol/lufa/descriptor.h
index 42af07917c..0471ef31de 100644
--- a/protocol/lufa/descriptor.h
+++ b/protocol/lufa/descriptor.h
@@ -85,6 +85,25 @@ typedef struct
USB_HID_Descriptor_HID_t NKRO_HID;
USB_Descriptor_Endpoint_t NKRO_INEndpoint;
#endif
+
+#ifdef MIDI_ENABLE
+ // MIDI Audio Control Interface
+ USB_Descriptor_Interface_t Audio_ControlInterface;
+ USB_Audio_Descriptor_Interface_AC_t Audio_ControlInterface_SPC;
+
+ // MIDI Audio Streaming Interface
+ USB_Descriptor_Interface_t Audio_StreamInterface;
+ USB_MIDI_Descriptor_AudioInterface_AS_t Audio_StreamInterface_SPC;
+ USB_MIDI_Descriptor_InputJack_t MIDI_In_Jack_Emb;
+ USB_MIDI_Descriptor_InputJack_t MIDI_In_Jack_Ext;
+ USB_MIDI_Descriptor_OutputJack_t MIDI_Out_Jack_Emb;
+ USB_MIDI_Descriptor_OutputJack_t MIDI_Out_Jack_Ext;
+ USB_Audio_Descriptor_StreamEndpoint_Std_t MIDI_In_Jack_Endpoint;
+ USB_MIDI_Descriptor_Jack_Endpoint_t MIDI_In_Jack_Endpoint_SPC;
+ USB_Audio_Descriptor_StreamEndpoint_Std_t MIDI_Out_Jack_Endpoint;
+ USB_MIDI_Descriptor_Jack_Endpoint_t MIDI_Out_Jack_Endpoint_SPC;
+#endif
+
} USB_Descriptor_Configuration_t;
@@ -115,9 +134,15 @@ typedef struct
# define NKRO_INTERFACE CONSOLE_INTERFACE
#endif
+#ifdef MIDI_ENABLE
+# define MIDI_INTERFACE (NKRO_INTERFACE + 1)
+# define MIDI2_INTERFACE (NKRO_INTERFACE + 2)
+#else
+# define MIDI2_INTERFACE NKRO_INTERFACE
+#endif
/* nubmer of interfaces */
-#define TOTAL_INTERFACES (NKRO_INTERFACE + 1)
+#define TOTAL_INTERFACES MIDI2_INTERFACE + 1
// Endopoint number and size
@@ -150,12 +175,21 @@ typedef struct
# endif
#endif
+#ifdef MIDI_ENABLE
+# define MIDI_STREAM_IN_EPNUM (NKRO_IN_EPNUM + 1)
+# define MIDI_STREAM_OUT_EPNUM (NKRO_IN_EPNUM + 1)
+#else
+# define MIDI_STREAM_IN_EPNUM NKRO_IN_EPNUM
+# define MIDI_STREAM_OUT_EPNUM NKRO_IN_EPNUM
+#endif
+
#define KEYBOARD_EPSIZE 8
#define MOUSE_EPSIZE 8
#define EXTRAKEY_EPSIZE 8
#define CONSOLE_EPSIZE 32
#define NKRO_EPSIZE 16
+#define MIDI_STREAM_EPSIZE 64
uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,