
usbd parse descriptors() 2006, QNX Software Systems GmbH & Co. KG.
|
(INTERFACE) - ..... (INTERFACE)
|
(ENDPOINT) - ..... (ENDPOINT)
Any vendor-specific or class-specific descriptors that are embedded
into the standard descriptor output are also inserted into this tree at the
appropriate point.
Although a descriptor for endpoint 0 (control) isn’t present on the
wire, one is constructed and placed in the tree (to simplify
enumeration within the class driver).
You use type for specifying the type of descriptor to find; index is the
nth occurrence. Note that type 0 will match any descriptor type; you
can use it to retrieve any embedded class or vendor-specific
descriptors if you don’t know their type.
Here’s an example that will walk all endpoints for an interface:
for (eix = 0; (desc = usbd parse descriptors(device, ifc, USB DESC ENDPOINT,
eix, &ept)) != NULL; ++eix)
;
where ifc is the appropriate (INTERFACE) node (found by a previous
call to usbd
parse descriptors() or usbd interface descriptor().
Returns:
A pointer to the descriptor on success, NULL on error.
Classification:
QNX Neutrino, QNX 4
Safety
Cancellation point No
Interrupt handler No
Signal handler No
continued.. .
72 Chapter 4 USB Library Reference November 2, 2006
Comentarios a estos manuales