123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- #ifndef _DESCRIPTORS_H_
- #define _DESCRIPTORS_H_
-
- #include <LUFA/Drivers/USB/USB.h>
- #include <avr/pgmspace.h>
- #include "Config/AppConfig.h"
-
-
- #define AUDIO_STREAM_EPADDR (ENDPOINT_DIR_IN | 1)
-
- #define AUDIO_STREAM_EPSIZE 256
-
-
- typedef struct
- {
- USB_Descriptor_Configuration_Header_t Config;
-
- USB_Descriptor_Interface_t Audio_ControlInterface;
- USB_Audio_Descriptor_Interface_AC_t Audio_ControlInterface_SPC;
- USB_Audio_Descriptor_InputTerminal_t Audio_InputTerminal;
- USB_Audio_Descriptor_OutputTerminal_t Audio_OutputTerminal;
-
- USB_Descriptor_Interface_t Audio_StreamInterface_Alt0;
- USB_Descriptor_Interface_t Audio_StreamInterface_Alt1;
- USB_Audio_Descriptor_Interface_AS_t Audio_StreamInterface_SPC;
- USB_Audio_Descriptor_Format_t Audio_AudioFormat;
- USB_Audio_SampleFreq_t Audio_AudioFormatSampleRates[5];
- USB_Audio_Descriptor_StreamEndpoint_Std_t Audio_StreamEndpoint;
- USB_Audio_Descriptor_StreamEndpoint_Spc_t Audio_StreamEndpoint_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
|