Detach from the USB device
#include <sys/usbdi.h> int usbd_detach( struct usbd_device *device );
libusbdi
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().
Safety: | |
---|---|
Cancellation point | Yes |
Interrupt handler | No |
Signal handler | No |
Thread | Yes |
Don't try to detach if there's I/O pending on the device. If there is, usbd_detach() will fail.
usbd_attach(), usbd_close_pipe(), usbd_connect(), usbd_disconnect(), usbd_open_pipe()