SDAA062 September 2025 TMS320F28P559SJ-Q1
An interface descriptor describes the details of the function of the product. For example, if the device is a keyboard, the specified device class is Human Interface Device (HID) and the number of endpoints is two. See the USB Device Classes page for details on USB Device Class codes in usblib.h. Specific definitions can be found in the appropriate device class header files.
In the TI USB composite device project, the interface descriptor structure is defined in usblib.h, the instance and values are initialized by BuildCompositeDescriptor in usbcomp.c called by USBDCompositeInit function, the key elements of an interface descriptor are listed in Table 2-3.
typedef struct
{
uint8_t bLength;
uint8_t bDescriptorType;
uint8_t bInterfaceNumber;
uint8_t bAlternateSetting;
uint8_t bNumEndpoints;
uint8_t bInterfaceClass;
uint8_t bInterfaceSubClass;
uint8_t bInterfaceProtocol;
uint8_t iInterface;
}
PACKED tInterfaceDescriptor;
| Key Elements | Description |
|---|---|
| bNumEndpoints | Number of endpoints in the interface |
| bInterfaceClass | USB device class used to set transfer types for the endpoints |