diff options
author | Jack Humbert <jack.humb@gmail.com> | 2015-08-21 23:14:48 -0400 |
---|---|---|
committer | Jack Humbert <jack.humb@gmail.com> | 2015-08-21 23:14:48 -0400 |
commit | 476e29d1190ac45b810109512bbb50cc4769493b (patch) | |
tree | 1d493bae3b0ae91a6202918aa1bf53fb0da936fa /protocol/lufa/descriptor.h | |
parent | 2d76b5c3d421c984f6b4b9da757383cc87e3f808 (diff) | |
parent | b191f8c60fbbaf1fb55d67edb86a6c33489b2ce3 (diff) |
Merge pull request #26 from jackhumbert/midi
Midi
Diffstat (limited to 'protocol/lufa/descriptor.h')
-rw-r--r-- | protocol/lufa/descriptor.h | 36 |
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, |