libusb.3 (aa87aa52326be7b726664dba65e91ec3d8160f48) | libusb.3 (4c6bcffd04f9d0b6cb57af0ffcc9be3098fe950c) |
---|---|
1.\" 2.\" Copyright (c) 2009 Sylvestre Gallon 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 10 unchanged lines hidden (view full) --- 19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23.\" SUCH DAMAGE. 24.\" 25.\" $FreeBSD$ 26.\" | 1.\" 2.\" Copyright (c) 2009 Sylvestre Gallon 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 10 unchanged lines hidden (view full) --- 19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23.\" SUCH DAMAGE. 24.\" 25.\" $FreeBSD$ 26.\" |
27.Dd October, 2, 2022 | 27.Dd January, 26, 2023 |
28.Dt LIBUSB 3 29.Os 30.Sh NAME 31.Nm libusb 32.Nd "USB access library" 33.Sh LIBRARY 34USB access library 35.Pq libusb, -lusb --- 6 unchanged lines hidden (view full) --- 42The current implementation supports v1.0 of the libusb API. 43.Sh LIBRARY INITIALISATION AND DEINITIALISATION 44.Ft "const struct libusb_version *" 45.Fn libusb_get_version "void" 46This function returns version information about LibUSB. 47.Pp 48.Ft int 49.Fn libusb_init "libusb_context **ctx" | 28.Dt LIBUSB 3 29.Os 30.Sh NAME 31.Nm libusb 32.Nd "USB access library" 33.Sh LIBRARY 34USB access library 35.Pq libusb, -lusb --- 6 unchanged lines hidden (view full) --- 42The current implementation supports v1.0 of the libusb API. 43.Sh LIBRARY INITIALISATION AND DEINITIALISATION 44.Ft "const struct libusb_version *" 45.Fn libusb_get_version "void" 46This function returns version information about LibUSB. 47.Pp 48.Ft int 49.Fn libusb_init "libusb_context **ctx" |
50This function initialises libusb. 51It must be called at the beginning 52of the program, before other libusb routines are used. 53This function returns 0 on success or LIBUSB_ERROR on 54failure. | 50Call this function before any other libusb v1.0 API function, to 51initialise a valid libusb v1.0 context. 52If the 53.Fa ctx 54argument is non-NULL, a pointer to the libusb context is stored at 55the given location. 56This function returns 0 upon success or LIBUSB_ERROR on failure. |
55.Pp | 57.Pp |
58.Ft int 59.Fn libusb_init_context "libusb_context **ctx" "const struct libusb_init_option []" "int num_options" 60Call this function before any other libusb v1.0 API function, to 61initialise a valid libusb v1.0 context. 62If the 63.Fa ctx 64argument is non-NULL, a pointer to the libusb context is stored at 65the given location. 66Additional options, like the USB debug level, may be given using the 67second and third argument. 68If no options are needed, simply use libusb_init(). 69This function returns 0 upon success or a LIBUSB_ERROR value on failure. 70.Pp |
|
56.Ft void 57.Fn libusb_exit "libusb_context *ctx" 58Deinitialise libusb. 59Must be called at the end of the application. 60Other libusb routines may not be called after this function. 61.Pp 62.Ft int 63.Fn libusb_has_capability "uint32_t capability" --- 729 unchanged lines hidden --- | 71.Ft void 72.Fn libusb_exit "libusb_context *ctx" 73Deinitialise libusb. 74Must be called at the end of the application. 75Other libusb routines may not be called after this function. 76.Pp 77.Ft int 78.Fn libusb_has_capability "uint32_t capability" --- 729 unchanged lines hidden --- |