usbdGetDescriptors

Purpose

Reads the descriptors from the device.

Syntax

#include <usbdi.h>
USBstatus usbdGetDescriptors(handle, ppdesc)
USBhandle handle;
PDESCIDX *ppdesc;

Parameter

Item Description
handle Handle of open USB logical device that is returned by the USBD_OPEN_DEVICE fp_ioctl.
ppdesc Location to store pointer to the descriptor index structure.

Description

The USB client driver uses this function to get access to certain common USB descriptors and strings. Upon return from the call, a pointer to a DESCIDX structure is stored in the specified location. The index array and the descriptors must be treated as read-only data and must not be freed when it is not required. The pointer is not valid after the device is disconnected and must not be used. For more information, see the DESCIDX structure defined in the /usr/include/sys/usbdi.h file.

Execution Environment

This function might be called from kernel process environment only.

Return Values

Value Description
USBD_SUCCESS Success
All others Failure