Keil Logo Arm Logo

Technical Support

On-Line Manuals

RL-ARM User's Guide

RL-RTX RL-FlashFS RL-TCPnet RL-CAN RL-USB RL-USB for USB Device Applications RL-USB Device Library RL-USB Device Features RL-USB Device Software Stack RL-USB Device Functions RL-USB Device Source Files RL-USB Device Configuration Audio Device (ADC) Options Communication Device (CDC) - ACM Options Human Interface Device (HID) Options Mass Storage Device (MSC) Options Create USB Device Applications Create ADC Applications Create CDC ACM Applications Create HID Applications Create MSC Applications Create Composite Applications Test USB Device Applications Compliance Tests Test HID Client Application RL-USB for USB Host Applications RL-USB Host Library RL-USB Host Features RL-USB Host Software Stack RL-USB Host Functions RL-USB Host Source Files RL-USB Host Configuration Host Controller Driver Selection Host Controller Driver Configuration Host Class Driver Selection Create USB Host Applications Create USB Host HID Applications HID_Kbd Example Create USB Host MSC Applications Create USB Host Class Driver RL-USB Host Constants and Structures Error constants Speed constants Transaction Packet Type constants Transaction Error Type constants USB Request Block structure (USBH_URB) Endpoint structure (USBH_EP) Driver Capabilites structure (USBH_HCI_CAP) Device Class Instance structure (USBH_DCI) Host Controller Instance structure (USBH_HCI) Host Controller Driver structure (USBH_HCD) USB Concepts USB Transfer Rates USB Network Basic Communication Model USB Protocol Control Transfer Interrupt Transfer Isochronous Transfer Bulk Transfer Descriptors Device Configuration Device Descriptor Configuration Descriptor Interface Descriptor Endpoint Descriptor Device Qualifier Descriptor Example Programs Library Reference Appendix

Interface Descriptor

The Interface Descriptor describes a collection of endpoints. This interface supports a group of pipes that are suitable for a particular task. Each configuration can have multiple interfaces. The interface can be selected dynamically by the USB host. The Interface Descriptor can associate its collection of pipes with a device class, which in turn has an associated class device driver within the host operating system. Typically, the device class is a functional type such as a printer class or mass storage class.

An interface descriptor never includes Endpoint 0 in the number of endpoints. If an interface uses only Endpoint 0, then the field bNumEndpoints must be set to zero.

If no class type has been selected for the device, then none of the standard USB drivers is loaded, and the developer has to provide its own device driver.

Offset Field Size Value Description
0 bLength 1 Number Size of this descriptor in bytes.
1 bDescriptorType 1 Constant Device Descriptor Type.
2 bInterfaceNumber 1 Number The number of this interface. Zero-based value, identifying the index in the array of concurrent interfaces supported by this configuration.
3 bAlternateSetting 1 Number Value used to select this alternate setting for the interface identified in the prior field. Allows an interface to change its settings on the fly.
4 bNumEndpoints 1 Number Number of endpoints used by this interface (excluding endpoint zero). If this value is zero, this interface only uses the Default Control Pipe.
5 bInterfaceClass 1 Class Class code (assigned by the USB-IF). A value of zero is reserved for future standardization.

If this field is set to FFH, the interface class is vendor-specific. All other values are reserved for assignment by the USB-IF.
6 bInterfaceSubClass 1 SubClass Subclass code (assigned by the USB-IF).

If the bInterfaceClass field is reset to zero, this field must also be reset to zero.

If the bInterfaceClass field is not set to FFH, all values are reserved for assignment by the USB-IF.
7 bInterfaceProtocol 1 Protocol Protocol code (assigned by the USB).

If an interface supports class-specific requests, this code identifies the protocols that the device uses as defined in the device class.

If this field is reset to zero, the device does not use a class-specific protocol on this interface.

If this field is set to FFH, the device uses a vendor-specific protocol for this interface.
8 iInterface 1 Index Index of string descriptor describing this interface.

For example, two device with different interfaces are needed. The first interface, Interface Zero, has the field bInterfaceNumber set to zero.
The next interface, Interface One, has the field bInterfaceNumber set to one and the field bAlternativeSetting also set to zero (default). It is possible to define an alternative setting for this device, by leaving the field bInterfaceNumber set to one, but with the field bAlternativeSetting is set to one instead of zero.

The first two interface descriptors with bAlternativeSettings equal to zero are used. However, the host can send a SetInterface() request to enable the alternative setting.

Alternative Interface

Keil logo

Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings