usbd_io
![]() |
![]() |
![]() |
![]() |
usbd_io()
Submit a previously set up URB to the USB stack
Synopsis:
#include <sys/usbdi.h>
int usbd_io( struct usbd_urb *urb,
struct usbd_pipe *pipe,
void (*func)(struct usbd_urb *,
struct usbd_pipe *, void *),
void *handle,
_uint32 timeout );
Arguments:
- urb
- A pointer to a USB Request Block.
- pipe
- An opaque handle returned by usbd_open_pipe().
- func
- Callback at I/O completion, given URB, pipe, plus handle.
- handle
- User data.
- timeout
- A value (in milliseconds) or USBD_TIME_DEFAULT or USBD_TIME_INFINITY.
Library:
libusbdi
Description:
This routine submits a previously set up URB to the USB stack. The URB would have been set up from one of these functions:
- usbd_setup_bulk()
- usbd_setup_control()
- usbd_setup_interrupt()
- usbd_setup_isochronous()
- usbd_setup_vendor()
![]() |
For this release of the USB DDK, vendor requests are synchronous only. Therefore, the func parameter in usbd_io() must be NULL. |
The usbd_io() function is the one that actually makes the data transfer happen; the setup functions simply set up the URB for the data transfer.
Returns:
- EBADF
- Improper usbd_connect() call.
- EINVAL
- Improper usbd_connect() call.
- ENODEV
- Device was removed.
Classification:
| Safety: | |
|---|---|
| Cancellation point | Yes |
| Interrupt handler | No |
| Signal handler | No |
| Thread | Yes |
See also:
usbd_descriptor(), usbd_feature(), usbd_setup_control(), usbd_setup_bulk(), usbd_setup_interrupt(), usbd_setup_isochronous(), usbd_setup_vendor(), usbd_status()
![]() |
![]() |
![]() |
![]() |

![[Previous]](prev.gif)
![[Contents]](contents.gif)
![[Index]](keyword_index.gif)
![[Next]](next.gif)

