usbd_detach()

Detach from the USB device

Synopsis:

#include <sys/usbdi.h>

int usbd_detach( struct usbd_device *device ); 

Arguments:

device
An opaque handle from usbd_attach().

Library:

libusbdi

Description:

You use the usbd_detach() function to disconnect from a USB device that you previously had attached to via usbd_attach().

The usbd_detach() function automatically closes any pipes previously opened via usbd_open_pipe().

Returns:

EOK
Success.
EBUSY
I/O pending on the device.

Classification:

QNX Neutrino, QNX 4

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

Caveats:

Don't try to detach if there's I/O pending on the device. If there is, usbd_detach() will fail.

See also:

usbd_attach(), usbd_close_pipe(), usbd_connect(), usbd_disconnect(), usbd_open_pipe()