This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. |
Get the device descriptor for a specific device
#include <sys/usbdi.h> usbd_device_descriptor_t *usbd_device_descriptor( struct usbd_device *device, struct usbd_desc_node **node );
The usbd_device_descriptor() function lets you obtain the device descriptor for a specific device (a handle from usbd_attach()).
The node parameter tells you where a descriptor was found to root future requests from (e.g. configurations of the device).
The usbd_device_descriptor_t structure looks like this:
typedef struct usbd_device_descriptor { _uint8 bLength; _uint8 bDescriptorType; _uint16 bcdUSB; _uint8 bDeviceClass; _uint8 bDeviceSubClass; _uint8 bDeviceProtocol; _uint8 bMaxPacketSize0; _uint16 idVendor; _uint16 idProduct; _uint16 bcdDevice; _uint8 iManufacturer; _uint8 iProduct; _uint8 iSerialNumber; _uint8 bNumConfigurations; } usbd_device_descriptor_t;
A pointer to usbd_device_descriptor_t on success, or NULL on error.
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | No |
Thread | Yes |
usbd_args_lookup(), usbd_configuration_descriptor(), usbd_device_lookup(), usbd_device_extra(), usbd_endpoint_descriptor(), usbd_hcd_info(), usbd_hub_descriptor(), usbd_interface_descriptor(), usbd_languages_descriptor(), usbd_parse_descriptors(), usbd_string(), usbd_urb_status()