Home |
Function RTUGetDevice Function RTUEndpointPacketSize |
Function RTUGetDeviceRTUGetDevice returns a pointer to the device descriptor of a device: typedef struct { BYTE bLength; // length in bytes of this descriptor BYTE bDescriptor; // descriptor ID (1) WORD bcdUSB; // USB version (BCD format) BYTE bDeviceClass; // the device's class BYTE bDeviceSubClass; // and subclass BYTE bDeviceProtocol; // and protocol BYTE bMaxPacketSize0; // default control pipe max packet len WORD idVendor; // vendor ID WORD idProduct; // product ID WORD bcdDevice; // device's version (BCD format) BYTE iManufacturer; // index of vendor's string descriptor BYTE iProduct; // index of product's string descriptor BYTE iSerialNumber; // index of product's serial number BYTE bNumConfigurations; // number of available configurations } RTUDeviceDescriptor; const RTUDeviceDescriptor * RTUGetDevice(RTUDeviceHandle Device); ParametersDeviceDevice handle passed to an attachment/detachment callback. return valuePointer to the device descriptor of the device referenced by Device. Most devices do not publish their class/subclass/protocol in the device descriptor. If these values are zero, individual interfaces contain this information. Member bNumConfigurations indicates how many configuration descriptors are available through function RTUGetConfiguration. Members iManufacturer, iProduct, and iSerialNumber are string descriptor indices and can be used with RTUGetString to retrieve displayable information about a device. Further details about the device descriptor are given in the USB specification.
|