Include control interface descriptor in cfgDesc_Audio2 when USB_CONTROL_DESCS is defined

This commit is contained in:
Shuchita Khare
2024-01-17 12:28:47 +00:00
parent 1f74f8c601
commit a12111ba55

View File

@@ -772,6 +772,11 @@ typedef struct
unsigned char configDesc_DFU[DFU_LENGTH];
#endif
#ifdef USB_CONTROL_DESCS
/* Inferface descriptor for control */
unsigned char itfDesc_control[9];
#endif
#ifdef IAP
USB_Descriptor_Interface_t iAP_Interface;
USB_Descriptor_Endpoint_t iAP_Out_Endpoint;
@@ -2104,6 +2109,21 @@ USB_Config_Descriptor_Audio2_t cfgDesc_Audio2=
#endif
#endif /* (XUA_DFU_EN == 1) */
#ifdef USB_CONTROL_DESCS
{
/* Control interface descriptor */
0x09, /* 0 bLength : Size of this descriptor, in bytes. (field size 1 bytes) */
0x04, /* 1 bDescriptorType : INTERFACE descriptor. (field size 1 bytes) */
(INTERFACE_NUMBER_MISC_CONTROL), /* 2 bInterfaceNumber */
0x00, /* 3 bAlternateSetting : Index of this setting. (field size 1 bytes) */
0x00, /* 4 bNumEndpoints : 0 endpoints. (field size 1 bytes) */
USB_CLASS_VENDOR_SPECIFIC, /* 5 bInterfaceClass : Vendor specific. (field size 1 bytes) */
0xFF, /* 6 bInterfaceSubclass : (field size 1 bytes) */
0xFF, /* 7 bInterfaceProtocol : Unused. (field size 1 bytes) */
offsetof(StringDescTable_t, ctrlStr)/sizeof(char *), /* 8 iInterface */
},
#endif
#ifdef IAP
/* Interface descriptor */
.iAP_Interface =