200 lines
4.8 KiB
C
200 lines
4.8 KiB
C
#ifndef USBD_DESCRIPTORS_H
|
|
#define USBD_DESCRIPTORS_H
|
|
|
|
UCHAR device_framework_fs[] = {
|
|
/* Device descriptor, size=18 */
|
|
0x12, // bLength
|
|
0x01, // bDescriptorType
|
|
0x00, 0x02, // bcdUSB
|
|
0xEF, // bDeviceClass !! DESCRIBED IN IAD
|
|
0x02, // bDeviceSubClass !! -^
|
|
0x01, // bDeviceProtocol !! -^
|
|
0x08, // bMaxPacketSize0
|
|
0x83, 0x04, // idVendor !! 0x0483
|
|
0x30, 0x57, // idProduct !! 0x5730
|
|
0x00, 0x00, // bcdDevice
|
|
0x01, // iManufacturer
|
|
0x02, // iProduct
|
|
0x03, // iSerialNumber
|
|
0x01, // bNumConfigurations
|
|
|
|
/* Configuration descriptor size=9 */
|
|
0x09, // bLength
|
|
0x02, // bDescriptorType
|
|
0x41, 0x00, // wTotalLength !! 9 + 8 + 9 + 9 + 8 + 8 + 14 + ...
|
|
0x01, // bNumInterfaces
|
|
0x01, // bConfigurationValue
|
|
0x00, // iConfiguration
|
|
0x80, // bmAttributes !! Bus powered
|
|
0x39, // bMaxPower
|
|
|
|
/* Interface Association descriptor <ECN> size=8 */
|
|
0x08, // bLength
|
|
0x0B, // bDescriptorType !! IAD, See ECN
|
|
0x00, // bFirstInterface
|
|
0x01, // bInterfaceCount
|
|
0x01, // bFunctionClass !! AUDIO_FUNCTION
|
|
0x00, // bFunctionSubClass !! FUNCTION_SUBCLASS_UNDEFINED
|
|
0x20, // bFunctionProtocol !! AF_VERSION_02_00
|
|
0x00, // iFunction
|
|
|
|
/* Audio Control Interface descriptor size=9 */
|
|
0x09, // bLength
|
|
0x04, // bDescriptorType
|
|
0x00, // bInterfaceNumber
|
|
0x00, // bAlternateSetting
|
|
0x00, // bNumEndpoints
|
|
0x01, // bInterfaceClass
|
|
0x01, // bInterfaceSubClass
|
|
0x20, // bInterfaceProtocol
|
|
0x00, // iInterface
|
|
|
|
/* Audio Control Interface Header descriptor size=9 */
|
|
0x09, // bLength
|
|
0x24, // bDescriptorType
|
|
0x01, // bDescriptorSubType
|
|
0x00, 0x02, // bcdADC !! 2.00
|
|
0x08, // bCategory
|
|
0x27, 0x00, // wTotalLength !! UAC2 Table 4-5 9 + 8 + 8 + 14 + ...
|
|
0x00, // bmControls
|
|
|
|
/* Audio Control Clock Source descriptor clockid=0 size=8 */
|
|
0x08, // bLength
|
|
0x24, // bDescriptorType
|
|
0x0A, // bDescriptorSubType
|
|
0x00, // bClockID
|
|
0x01, // bmAttributes !! Internal fixed clock
|
|
0x01, // bmControls
|
|
0x00, // bAssocTerminal
|
|
0x00, // iClockSource
|
|
|
|
/* Audio Control Clock Source descriptor clockid=1 size=8 */
|
|
0x08, // bLength
|
|
0x24, // bDescriptorType
|
|
0x0A, // bDescriptorSubType
|
|
0x01, // bClockID
|
|
0x01, // bmAttributes !! Internal fixed clock
|
|
0x01, // bmControls
|
|
0x00, // bAssocTerminal
|
|
0x00, // iClockSource
|
|
|
|
/* Audio Control Feature Unit descriptor size=14 */
|
|
0x0E, // bLength !!
|
|
0x24, // bDescriptorType
|
|
0x06, // bDescriptorSubType
|
|
0x05, // bUnitID !!
|
|
0x04, // bSourceID !!
|
|
0x0F, 0x00, 0x00, 0x00, // bmaControls(0) !!
|
|
0x0F, 0x00, 0x00, 0x00, // bmaControls(1) !!
|
|
0x00, // iFeature
|
|
};
|
|
|
|
UCHAR device_framework_hs[] = {
|
|
/* Device descriptor */
|
|
0x12,
|
|
0x01,
|
|
0x00,
|
|
0x02,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x40,
|
|
0x81,
|
|
0x07,
|
|
0x00,
|
|
0x00,
|
|
0x01,
|
|
0x00,
|
|
0x01,
|
|
0x02,
|
|
0x03,
|
|
0x01,
|
|
|
|
/* Device qualifier descriptor */
|
|
0x0a,
|
|
0x06,
|
|
0x00,
|
|
0x02,
|
|
0x00,
|
|
0x00,
|
|
0x00,
|
|
0x40,
|
|
0x01,
|
|
0x00,
|
|
|
|
/* Configuration descriptor */
|
|
0x09,
|
|
0x02,
|
|
0x20,
|
|
0x00,
|
|
0x01,
|
|
0x01,
|
|
0x00,
|
|
0xc0,
|
|
0x32,
|
|
|
|
/* Interface descriptor */
|
|
0x09,
|
|
0x04,
|
|
0x00,
|
|
0x00,
|
|
0x02,
|
|
0x08,
|
|
0x06,
|
|
0x50,
|
|
0x00,
|
|
|
|
/* Endpoint descriptor (Bulk In) */
|
|
0x07,
|
|
0x05,
|
|
0x81,
|
|
0x02,
|
|
0x00,
|
|
0x02,
|
|
0x00,
|
|
|
|
/* Endpoint descriptor (Bulk Out) */
|
|
0x07,
|
|
0x05,
|
|
0x02,
|
|
0x02,
|
|
0x00,
|
|
0x02,
|
|
0x00,
|
|
};
|
|
|
|
/* Note: this is not the standard string descriptor. */
|
|
UCHAR device_framework_string[] = {
|
|
/* Manufacturer string descriptor : Index 1 */
|
|
0x09, 0x04, // wLANGID
|
|
0x01, // bIndex
|
|
0x12, // bLength
|
|
'S', 'T', 'M', 'i', // ..DATA
|
|
'c', 'r', 'o', 'e', // -^
|
|
'l', 'e', 'c', 't', // -^
|
|
'r', 'o', 'n', 'i', // -^
|
|
'c', 's', // -^
|
|
|
|
/* Product string descriptor : Index 2 */
|
|
0x09, 0x04, // wLANGID
|
|
0x02, // bIndex
|
|
0x0a, // bLength
|
|
'L', 'o', '-', 'R', // ..DATA
|
|
'e', 's', ' ', 'D', // -^
|
|
'A', 'C', // -^
|
|
|
|
/* Serial Number string descriptor : Index 3 */
|
|
0x09,
|
|
0x04, // wLANGID
|
|
0x03, // bIndex
|
|
0x04, // bLength
|
|
0x30, 0x30, 0x30, 0x31, // "0001"
|
|
};
|
|
|
|
UCHAR device_framework_lang_id[] = {
|
|
/* English. */
|
|
0x09,
|
|
0x04,
|
|
};
|
|
|
|
#endif |