123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- #ifndef _DESCRIPTORS_H_
- #define _DESCRIPTORS_H_
-
- #include <LUFA/Drivers/USB/USB.h>
- #include <avr/pgmspace.h>
-
-
- #define MIDI_STREAM_IN_EPADDR (ENDPOINT_DIR_IN | 2)
-
- #define MIDI_STREAM_OUT_EPADDR (ENDPOINT_DIR_OUT | 1)
-
- #define MIDI_STREAM_EPSIZE 64
-
-
- typedef struct
- {
- USB_Descriptor_Configuration_Header_t Config;
-
- USB_Descriptor_Interface_t Audio_ControlInterface;
- USB_Audio_Descriptor_Interface_AC_t Audio_ControlInterface_SPC;
-
- 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;
- } USB_Descriptor_Configuration_t;
-
- enum InterfaceDescriptors_t
- {
- INTERFACE_ID_AudioControl = 0,
- INTERFACE_ID_AudioStream = 1,
- };
-
- enum StringDescriptors_t
- {
- STRING_ID_Language = 0,
- STRING_ID_Manufacturer = 1,
- STRING_ID_Product = 2,
- };
-
- uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
- const uint16_t wIndex,
- const void** const DescriptorAddress)
- ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
- #endif
|