INtime SDK Help
UsbGetDescriptor
INtime SDK v6 > About INtime > Networking and I/O > USB > USB calls > UsbGetDescriptor

Get descriptors from a USB device.

int32_t UsbGetDescriptor( 
int32_t udev,
uint8_t desctype,
uint8_t descindex,
uint16_t langid,
void *buf,
uint16_t size
);

Parameters

udev
Device handle from UsbOpenDevice.
desctype 
Type of descriptor, one of:
#define USB_DT_DEVICE 0x01
#define USB_DT_CONFIG 0x02
#define USB_DT_STRING 0x03
#define USB_DT_INTERFACE 0x04
#define USB_DT_ENDPOINT 0x05
#define USB_DT_DEVICE_QUALIFIER 0x06
#define USB_DT_OTHER_SPEED_CONFIG 0x07
#define USB_DT_INTERFACE_POWER 0x08  
descindex
Descriptor number 0 .. N .
langid 
Language ids available at www.usb.org. Use zero for the default language .
buf 
Pointer to destination buffer for the descriptor.
size 
Size of the destination buffer. Should be at least as large as a descriptor of desctype.  

Return Values

USB_ERR_NORMAL_COMPLETION Success.
USB_ERR_NO_STACK The USB stack is not ready.
USB_ERR_MEMORY Memory could not be allocated for the operation.
USB_ERR_TIMEOUT The device did not respond.

Requirements

Versions Defined in Include Link to
INtime 5.0 intime/rt/include/usbif3.h usbif3.h usbif3.lib