libusb.3 (7bdc064b0b644d15bd9614d9e7db5c4279736d75) libusb.3 (a0c93fa361cfa5930db3c2143172d1a2095b4b3e)
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:

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

21.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25.\" SUCH DAMAGE.
26.\"
27.\" $FreeBSD$
28.\"
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:

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

21.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25.\" SUCH DAMAGE.
26.\"
27.\" $FreeBSD$
28.\"
29.Dd June 22, 2016
29.Dd June 23, 2016
30.Dt LIBUSB 3
31.Os
32.Sh NAME
33.Nm libusb
34.Nd "USB access library"
35.Sh LIBRARY
36USB access library
37.Pq libusb, -lusb

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

516Perform an USB Interrupt transfer.
517A timeout value of zero means no timeout.
518The timeout value is given in milliseconds.
519Returns 0 on success, LIBUSB_ERROR_TIMEOUT
520if the transfer timed out, LIBUSB_ERROR_PIPE if the control request was not
521supported, LIBUSB_ERROR_OVERFLOW if the device offered more data,
522LIBUSB_ERROR_NO_DEVICE if the device has been disconnected and
523a LIBUSB_ERROR code on other failure.
30.Dt LIBUSB 3
31.Os
32.Sh NAME
33.Nm libusb
34.Nd "USB access library"
35.Sh LIBRARY
36USB access library
37.Pq libusb, -lusb

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

516Perform an USB Interrupt transfer.
517A timeout value of zero means no timeout.
518The timeout value is given in milliseconds.
519Returns 0 on success, LIBUSB_ERROR_TIMEOUT
520if the transfer timed out, LIBUSB_ERROR_PIPE if the control request was not
521supported, LIBUSB_ERROR_OVERFLOW if the device offered more data,
522LIBUSB_ERROR_NO_DEVICE if the device has been disconnected and
523a LIBUSB_ERROR code on other failure.
524.Sh USB STREAMS SUPPORT
525.Ft int
526.Fn libusb_alloc_streams "libusb_device_handle *dev" "uint32_t num_streams" "unsigned char *endpoints" "int num_endpoints"
527This function verifies that the given number of streams using the
528given number of endpoints is allowed and allocates the resources
529needed to use so-called USB streams.
530Currently only a single stream per endpoint is supported to simplify
531the internals of LibUSB.
532This function returns 0 on success or a LIBUSB_ERROR code on failure.
533.Pp
534.Ft int
535.Fn libusb_free_streams "libusb_device_handle *dev" "unsigned char *endpoints" "int num_endpoints"
536This function release resources needed for streams usage.
537Returns 0 on success or a LIBUSB_ERROR code on failure.
538.Pp
539.Ft void
540.Fn libusb_transfer_set_stream_id "struct libusb_transfer *transfer" "uint32_t stream_id"
541This function sets the stream ID for the given USB transfer.
542.Pp
543.Ft uint32_t
544.Fn libusb_transfer_get_stream_id "struct libusb_transfer *transfer"
545This function returns the stream ID for the given USB transfer.
546If no stream ID is used a value of zero is returned.
524.Sh USB EVENTS
525.Ft int
526.Fn libusb_try_lock_events "libusb_context *ctx"
527Try to acquire the event handling lock.
528Returns 0 if the lock was obtained and 1 if not.
529.Pp
530.Ft void
531.Fn libusb_lock_events "libusb_context *ctx"

--- 200 unchanged lines hidden ---
547.Sh USB EVENTS
548.Ft int
549.Fn libusb_try_lock_events "libusb_context *ctx"
550Try to acquire the event handling lock.
551Returns 0 if the lock was obtained and 1 if not.
552.Pp
553.Ft void
554.Fn libusb_lock_events "libusb_context *ctx"

--- 200 unchanged lines hidden ---