Lines 100-111
Link Here
|
100 |
.Ft uint8_t |
100 |
.Ft uint8_t |
101 |
.Fn libusb_get_bus_number "libusb_device *dev" |
101 |
.Fn libusb_get_bus_number "libusb_device *dev" |
102 |
Returns the number of the bus contained by the device |
102 |
Returns the number of the bus contained by the device |
103 |
.Fa dev. |
103 |
.Fa dev . |
104 |
.Pp |
104 |
.Pp |
105 |
.Ft uint8_t |
105 |
.Ft uint8_t |
106 |
.Fn libusb_get_device_address "libusb_device *dev" |
106 |
.Fn libusb_get_device_address "libusb_device *dev" |
107 |
Returns the device_address contained by the device |
107 |
Returns the device_address contained by the device |
108 |
.Fa dev. |
108 |
.Fa dev . |
109 |
.Pp |
109 |
.Pp |
110 |
.Ft enum libusb_speed |
110 |
.Ft enum libusb_speed |
111 |
.Fn libusb_get_device_speed "libusb_device *dev" |
111 |
.Fn libusb_get_device_speed "libusb_device *dev" |
Lines 127-138
Link Here
|
127 |
.Ft libusb_device * |
127 |
.Ft libusb_device * |
128 |
.Fn libusb_ref_device "libusb_device *dev" |
128 |
.Fn libusb_ref_device "libusb_device *dev" |
129 |
Increment the reference counter of the device |
129 |
Increment the reference counter of the device |
130 |
.Fa dev. |
130 |
.Fa dev . |
131 |
.Pp |
131 |
.Pp |
132 |
.Ft void |
132 |
.Ft void |
133 |
.Fn libusb_unref_device "libusb_device *dev" |
133 |
.Fn libusb_unref_device "libusb_device *dev" |
134 |
Decrement the reference counter of the device |
134 |
Decrement the reference counter of the device |
135 |
.Fa dev. |
135 |
.Fa dev . |
136 |
.Pp |
136 |
.Pp |
137 |
.Ft int |
137 |
.Ft int |
138 |
.Fn libusb_open "libusb_device *dev" "libusb_device_handle **devh" |
138 |
.Fn libusb_open "libusb_device *dev" "libusb_device_handle **devh" |
Lines 147-153
Link Here
|
147 |
A convenience function to open a device by vendor and product IDs |
147 |
A convenience function to open a device by vendor and product IDs |
148 |
.Fa vid |
148 |
.Fa vid |
149 |
and |
149 |
and |
150 |
.Fa pid. |
150 |
.Fa pid . |
151 |
Returns NULL on error. |
151 |
Returns NULL on error. |
152 |
.Pp |
152 |
.Pp |
153 |
.Ft void |
153 |
.Ft void |
Lines 161-167
Link Here
|
161 |
.Pp |
161 |
.Pp |
162 |
.Ft int |
162 |
.Ft int |
163 |
.Fn libusb_get_configuration "libusb_device_handle *devh" "int *config" |
163 |
.Fn libusb_get_configuration "libusb_device_handle *devh" "int *config" |
164 |
Returns the bConfiguration value of the current configuration. |
164 |
Returns the Configuration value of the current configuration. |
165 |
Returns 0 |
165 |
Returns 0 |
166 |
on success, LIBUSB_ERROR_NO_DEVICE if the device has been disconnected |
166 |
on success, LIBUSB_ERROR_NO_DEVICE if the device has been disconnected |
167 |
and a LIBUSB_ERROR code on error. |
167 |
and a LIBUSB_ERROR code on error. |
Lines 171-177
Link Here
|
171 |
Set the active configuration to |
171 |
Set the active configuration to |
172 |
.Fa config |
172 |
.Fa config |
173 |
for the device contained by |
173 |
for the device contained by |
174 |
.Fa devh. |
174 |
.Fa devh . |
175 |
This function returns 0 on success, LIBUSB_ERROR_NOT_FOUND if the requested |
175 |
This function returns 0 on success, LIBUSB_ERROR_NOT_FOUND if the requested |
176 |
configuration does not exist, LIBUSB_ERROR_BUSY if the interfaces are currently |
176 |
configuration does not exist, LIBUSB_ERROR_BUSY if the interfaces are currently |
177 |
claimed, LIBUSB_ERROR_NO_DEVICE if the device has been disconnected and a |
177 |
claimed, LIBUSB_ERROR_NO_DEVICE if the device has been disconnected and a |
Lines 180-186
Link Here
|
180 |
.Ft int |
180 |
.Ft int |
181 |
.Fn libusb_claim_interface "libusb_device_handle *devh" "int interface_number" |
181 |
.Fn libusb_claim_interface "libusb_device_handle *devh" "int interface_number" |
182 |
Claim an interface in a given libusb_handle |
182 |
Claim an interface in a given libusb_handle |
183 |
.Fa devh. |
183 |
.Fa devh . |
184 |
This is a non-blocking function. |
184 |
This is a non-blocking function. |
185 |
It returns 0 on success, LIBUSB_ERROR_NOT_FOUND |
185 |
It returns 0 on success, LIBUSB_ERROR_NOT_FOUND |
186 |
if the requested interface does not exist, LIBUSB_ERROR_BUSY if a program or |
186 |
if the requested interface does not exist, LIBUSB_ERROR_BUSY if a program or |
Lines 279-285
Link Here
|
279 |
.Ft int |
279 |
.Ft int |
280 |
.Fn libusb_get_device_descriptor "libusb_device *dev" "libusb_device_descriptor *desc" |
280 |
.Fn libusb_get_device_descriptor "libusb_device *dev" "libusb_device_descriptor *desc" |
281 |
Get the USB device descriptor for the device |
281 |
Get the USB device descriptor for the device |
282 |
.Fa dev. |
282 |
.Fa dev . |
283 |
This is a non-blocking function. |
283 |
This is a non-blocking function. |
284 |
Returns 0 on success and a LIBUSB_ERROR code on |
284 |
Returns 0 on success and a LIBUSB_ERROR code on |
285 |
failure. |
285 |
failure. |
Lines 330-340
Link Here
|
330 |
This function parses the USB 3.0 endpoint companion descriptor in host endian format pointed to by |
330 |
This function parses the USB 3.0 endpoint companion descriptor in host endian format pointed to by |
331 |
.Fa buf |
331 |
.Fa buf |
332 |
and having a length of |
332 |
and having a length of |
333 |
.Fa len. |
333 |
.Fa len . |
334 |
Typically these arguments are the extra and extra_length fields of the |
334 |
Typically these arguments are the extra and extra_length fields of the |
335 |
endpoint descriptor. |
335 |
endpoint descriptor. |
336 |
On success the pointer to resulting descriptor is stored at the location given by |
336 |
On success the pointer to resulting descriptor is stored at the location given by |
337 |
.Fa ep_comp. |
337 |
.Fa ep_comp . |
338 |
Returns zero on success and a LIBUSB_ERROR code on failure. |
338 |
Returns zero on success and a LIBUSB_ERROR code on failure. |
339 |
On success the parsed USB 3.0 endpoint companion descriptor must be |
339 |
On success the parsed USB 3.0 endpoint companion descriptor must be |
340 |
freed using the libusb_free_ss_endpoint_comp function. |
340 |
freed using the libusb_free_ss_endpoint_comp function. |
Lines 348-356
Link Here
|
348 |
This function parses a Binary Object Store, BOS, descriptor into host endian format pointed to by |
348 |
This function parses a Binary Object Store, BOS, descriptor into host endian format pointed to by |
349 |
.Fa buf |
349 |
.Fa buf |
350 |
and having a length of |
350 |
and having a length of |
351 |
.Fa len. |
351 |
.Fa len . |
352 |
On success the pointer to resulting descriptor is stored at the location given by |
352 |
On success the pointer to resulting descriptor is stored at the location given by |
353 |
.Fa bos. |
353 |
.Fa bos . |
354 |
Returns zero on success and a LIBUSB_ERROR code on failure. |
354 |
Returns zero on success and a LIBUSB_ERROR code on failure. |
355 |
On success the parsed BOS descriptor must be freed using the |
355 |
On success the parsed BOS descriptor must be freed using the |
356 |
libusb_free_bos_descriptor function. |
356 |
libusb_free_bos_descriptor function. |