[Previous] [Contents] [Index] [Next]

Caution: This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.

usbd_setup_control()

Set up a URB for a control transfer

Synopsis:


Caution: This function is still under development -- its synopsis and other details shown here may change significantly!

#include <sys/usbdi.h> usbd_setup_control( struct usbd_urb *urb, _uint32 flags, _uint16 request, _uint16 rtype, _uint16 value, _uint16 index, void *addr, _uint32 len );

Description:

This routine sets up a URB for a control transfer.

urb
An opaque handle (from usbd_alloc_urb()).
flags
One of the following:
request
A device-specific request.
rtype
Type of request (e.g. USB_RECIPIENT_DEVICE, USB_RECIPIENT_INTERFACE, USB_RECIPIENT_ENDPOINT, USB_RECIPIENT_OTHER, USB_TYPE_STANDARD, USB_TYPE_CLASS, USB_TYPE_VENDOR).
value
This varies, depending on the request. It's used for passing a parameter to the device.
index
This varies, depending on the request. It's used for passing a parameter to the device.
addr
Address for start of transfer -- you must use the buffer allocated by usbd_alloc().
len
The length (in bytes) of the data transfer.

Returns:

EOK
Success.

Classification:

QNX Neutrino, QNX 4

Safety:
Cancellation point No
Interrupt handler No
Signal handler No
Thread Yes

Caveats:

To ensure that the correct physical address will be used, you must use the buffer allocated by usbd_alloc() for the addr parameter.

See also:

usbd_descriptor(), usbd_feature(), usbd_io(), usbd_setup_bulk(), usbd_setup_interrupt(), usbd_setup_isochronous(), usbd_setup_vendor(), usbd_status()


[Previous] [Contents] [Index] [Next]