added IAD descriptor

This commit is contained in:
hathach
2012-12-03 18:43:35 +07:00
parent 21012d42a2
commit 6ea85a569a
4 changed files with 61 additions and 48 deletions

View File

@@ -65,22 +65,6 @@ typedef PRE_PACK struct POST_PACK _USB_STR_DESCRIPTOR
#define USB_DEVICE_SUBCLASS_IAD 0x02
#define USB_DEVICE_PROTOCOL_IAD 0x01
// USB Interface Association Descriptor
typedef PRE_PACK struct POST_PACK _USB_INTERFACE_ASSOCIATION_DESCRIPTOR
{
uint8_t bLength; /**< Size of descriptor*/
uint8_t bDescriptorType; /**< Other_speed_Configuration Type*/
uint8_t bFirstInterface; /**< Index of the first associated interface. */
uint8_t bInterfaceCount; /**< Total number of associated interfaces. */
uint8_t bFunctionClass; /**< Interface class ID. */
uint8_t bFunctionSubClass; /**< Interface subclass ID. */
uint8_t bFunctionProtocol; /**< Interface protocol ID. */
uint8_t iFunction; /**< Index of the string descriptor describing the interface association. */
} USB_INTERFACE_ASSOCIATION_DESCRIPTOR;
///////////////////////////////////////////////////////////////////////
// Interface Assosication Descriptor if device is CDC + other class
#define IAD_DESC_REQUIRED ( defined(CFG_CLASS_CDC) && (TUSB_CLASS_HID) )