libusb.3 (0f2c706643ff211ce1e1eb0cfbc3c05bc67f2311) libusb.3 (5b40d9601c72fbb04f32437d529dbf51252dc31e)
1.\"
2.\" Copyright (c) 2009 Sylvestre Gallon
3.\"
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:

--- 284 unchanged lines hidden (view full) ---

293.Fn libusb_attach_kernel_driver "libusb_device_handle *devh" "int interface"
294Re-attach an interface kernel driver that was previously detached.
295Returns 0 on success,
296LIBUSB_ERROR_INVALID_PARAM if the interface does not exist,
297LIBUSB_ERROR_NO_DEVICE
298if the device has been disconnected, LIBUSB_ERROR_BUSY if the driver cannot be
299attached because the interface is claimed by a program or driver and a
300LIBUSB_ERROR code on failure.
1.\"
2.\" Copyright (c) 2009 Sylvestre Gallon
3.\"
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:

--- 284 unchanged lines hidden (view full) ---

293.Fn libusb_attach_kernel_driver "libusb_device_handle *devh" "int interface"
294Re-attach an interface kernel driver that was previously detached.
295Returns 0 on success,
296LIBUSB_ERROR_INVALID_PARAM if the interface does not exist,
297LIBUSB_ERROR_NO_DEVICE
298if the device has been disconnected, LIBUSB_ERROR_BUSY if the driver cannot be
299attached because the interface is claimed by a program or driver and a
300LIBUSB_ERROR code on failure.
301.Pp
302.Ft int
303.Fn libusb_set_auto_detach_kernel_driver "libusb_device_handle *devh" "int enable"
304This function enables automatic kernel interface driver detach when an
305interface is claimed.
306When the interface is restored the kernel driver is allowed to be re-attached.
307If the
308.Fa enable
309argument is non-zero the feature is enabled.
310Else disabled.
311Returns 0 on success and a LIBUSB_ERROR code on
312failure.
301.Sh USB DESCRIPTORS
302.Ft int
303.Fn libusb_get_device_descriptor "libusb_device *dev" "libusb_device_descriptor *desc"
304Get the USB device descriptor for the device
305.Fa dev .
306This is a non-blocking function.
307Returns 0 on success and a LIBUSB_ERROR code on
308failure.

--- 300 unchanged lines hidden ---
313.Sh USB DESCRIPTORS
314.Ft int
315.Fn libusb_get_device_descriptor "libusb_device *dev" "libusb_device_descriptor *desc"
316Get the USB device descriptor for the device
317.Fa dev .
318This is a non-blocking function.
319Returns 0 on success and a LIBUSB_ERROR code on
320failure.

--- 300 unchanged lines hidden ---