
usbd
_
device
_
descriptor() © 2007, QNX Software Systems GmbH & Co. KG.
Get the device descriptor for a specific device
Synopsis:
#include <sys/usbdi.h>
usbd_device_descriptor_t
*usbd_device_descriptor(
struct usbd_device *device,
struct usbd_desc_node **node );
Arguments:
device A handle obtained by calling usbd
_
attach().
node The address of a pointer to a
usbd_device_descriptor_t structure
where the function stores the device descriptor.
Library:
libusbdi
Description:
The usbd
_
device
_
descriptor() function lets you obtain the device descriptor for a
specific device.
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;
Returns:
A pointer to usbd_device_descriptor_t on success, or NULL on error.
36 Chapter 4 • USB Library Reference September 10, 2007
Kommentare zu diesen Handbüchern