usbd_interface_descriptor()

Get the interface descriptor for a specific interface setting

Synopsis:

#include <sys/usbdi.h>

usbd_interface_descriptor_t 
   *usbd_interface_descriptor(
       struct usbd_device *device,                          
       uint8_t cfg,                                          
       uint8_t ifc,                                          
       uint8_t alt,                                          
       struct usbd_desc_node **node );                       

Arguments:

device
An opaque handle used to identify the USB device.
cfg
The device's configuration identifier (bConfigurationValue).
ifc
Interface identifier (bInterfaceNumber).
alt
Alternate identifier (bAlternateSetting).
node
Indicates the descriptor's location for rooting future requests (e.g. endpoints of this interface).

Library:

libusbdi

Description:

The usbd_interface_descriptor() function lets you obtain the interface descriptor for a specific interface setting.

The usbd_interface_descriptor_t structure looks like this:

typedef struct usbd_interface_descriptor {
    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;
} usbd_interface_descriptor_t;

Returns:

A pointer to usbd_interface_descriptor_t on success, or NULL on error.

Classification:

QNX Neutrino, QNX 4

Safety:
Cancellation point No
Interrupt handler No
Signal handler No
Thread Yes

See also:

usbd_args_lookup(), usbd_configuration_descriptor(), usbd_device_lookup(), usbd_device_extra(), usbd_device_descriptor(), usbd_endpoint_descriptor(), usbd_hcd_info(), usbd_hub_descriptor(), usbd_languages_descriptor(), usbd_parse_descriptors(), usbd_string(), usbd_urb_status()