Commit Graph

39 Commits

Author SHA1 Message Date
kevans
4506294d99 libusb: improve compatibility
Specifically, add LIBUSB_CLASS_PHYSICAL and the libusb_has_capability API.
Descriptions and functionality for these derived from the
documentation at [0].  The current set of capabilities are all supported by
libusb.

These were detected as missing after updating net/freerdp to 2.1.1, which
attempted to use both.

[0] http://libusb.sourceforge.net/api-1.0/group__libusb__misc.html

Reviewed by:	hselasky
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D25194
2020-06-09 17:17:43 +00:00
0mp
436cb77b9c libusb(3): Update the link to the libusb homepage.
While here, pet mandoc & igor.

Reviewed by:	bcr, hselasky
Approved by:	re (kib), krion (mentor, implicit), mat (mentor, implicit)
Differential Revision:	https://reviews.freebsd.org/D17516
2018-10-11 13:58:51 +00:00
hselasky
113f2d3998 Add support for USB streams to the LibUSB v1.0 API and update the
libusb(3) manual page.

Approved by:	re (gjb)
Requested by:	swills
MFC after:	1 week
2016-06-23 07:12:22 +00:00
hselasky
9cb5bd5f1c Implement libusb_hotplug_register_callback() and
libusb_hotplug_deregister_callback() for the LibUSB v1.0 API and
update the libusb(3) manual page.

Approved by:	re (kib)
Requested by:	swills
MFC after:	1 week
2016-06-22 10:38:41 +00:00
hselasky
2d112dac06 Add multiple missing descriptor parsing functions to the LibUSB v1.0 API.
Approved by:	re (kib)
Requested by:	swills
MFC after:	1 week
2016-06-16 16:17:29 +00:00
hselasky
b6f02274aa Add support for libusb_set_auto_detach_kernel_driver() to the LibUSB v1.0 API.
Approved by:	re (kostikbel)
Requested by:	swills
MFC after:	1 week
2016-06-16 14:26:04 +00:00
hselasky
29ad2f5a15 Add support for libusb_get_port_number() to the LibUSB v1.0 API.
Approved by:	re (kostikbel)
Requested by:	swills
MFC after:	1 week
2016-06-16 12:14:19 +00:00
hselasky
b6f4f4bfc4 Implement libusb_get_version() and update libusb manual page.
Approved by:	re (glebius)
Requested by:	swills
MFC after:	1 week
2016-06-16 07:48:21 +00:00
hselasky
530526c53d Fix spelling. 2015-01-14 06:46:25 +00:00
hselasky
9327f5e312 Implement two new libusb API functions.
PR:		usb/185454
MFC after:	2 weeks
2014-01-05 10:41:43 +00:00
emaste
fea20f0dd0 Add libusb_get_port_numbers
libusbx deprecated libusb_get_port_path and replaced it with
libusb_get_port_numbers.  The latter omits an extra parameter which was
unused in the FreeBSD implementation anyway.
2013-06-07 13:45:58 +00:00
emaste
550d992a33 Add libusb_get_port_path wrapper
This follows the libusbx API reference at
http://libusbx.sourceforge.net/api-1.0/group__dev.html

Reviewed by: hselasky@
2013-05-08 00:55:29 +00:00
gjb
8670397617 General mdoc(7) and typo fixes.
PR:		167734
Submitted by:	Nobuyuki Koganemaru (kogane!jp.freebsd.org)
MFC after:	3 days
2012-05-11 20:06:46 +00:00
hselasky
2463f208a2 Add missing LibUSB 1.0 API function: libusb_get_string_descriptor().
Reported by:	Xiaofan Chen
2012-05-07 14:07:13 +00:00
hselasky
912ab38d08 Fix typo. 2012-04-25 21:59:56 +00:00
hselasky
4a73b11710 Add missing LibUSB 1.0 API function.
Reported by:	lme @
MFC after:	1 week
2012-04-12 18:06:30 +00:00
joel
18bb501895 Minor mdoc fixes. 2012-03-24 15:17:18 +00:00
gjb
9761e3fdaf Fix various typos in manual pages.
Submitted by:	amdmi3
PR:		165431
MFC after:	1 week
2012-02-25 14:31:25 +00:00
hselasky
efcd317363 Add definition of some USB 3.0 descriptors to libusb 1.0 and libusb 2.0.
Some header file parts of this patch were taken from a patch submitted
by Maya Erez <merez@codeaurora.org> to the LibUSB developers list.

MFC after:	1 week
2011-11-09 19:03:26 +00:00
hselasky
d4695c896c Fix how libusb20_dev_kernel_driver_active() and
libusb_dev_kernel_driver_active() works. In case of
libusb20 the manpage was wrong and in case of
libusb10 the implementation was wrong.

Submitted by:	Kai Wang
MFC after:	3 days
2011-10-10 16:13:33 +00:00
hselasky
c186259e31 Implement missing USB debug information functions.
Approved by:	re (kib)
MFC after:	1 week
2011-09-19 08:52:06 +00:00
hselasky
4145a19caa Spelling corrections for LibUSB manual page (2/2).
MFC after:	1 week
Approved by:	re (kib)
PR:		docs/159898
2011-08-22 21:10:50 +00:00
hselasky
0100d50610 Whitespace corrections for LibUSB manual page (1/2).
MFC after:	1 week
Approved by:	re (kib)
PR:		docs/159898
2011-08-22 21:05:39 +00:00
hselasky
3cfc1ee7ba Update LibUSB v1.0 manual page:
- fix some minor spelling
 - fix some style
 - add description of new function

MFC after:	1 week
Approved by:	re (kib)
2011-08-16 21:04:04 +00:00
hselasky
cbcc560b1e - Add two missing functions to the LibUSB v0.1 API.
- Clamp the string length to 255 bytes when getting
  the interface description.
- Clamp data request length to 65535 bytes when doing
  control requests.

MFC after:	3 days
2011-07-16 08:29:12 +00:00
hselasky
8604b17766 - Add missing MLINKS for libusb and some manpage fixes.
MFC after:	14 days
Approved by:	thompsa (mentor)
2011-02-28 18:53:06 +00:00
hselasky
e9ba0d0f89 Correct description of the return values of
the LibUSB v1.0 libusb_control_transfer() function.

PR:		usb/151851
Submitted by:	HIROSHI OOTA
Approved by:	thompsa (mentor)
2010-11-18 08:32:47 +00:00
hselasky
ecefb244af - Add missing LibUSB API functions:
* libusb_strerror()
  * libusb_get_driver[_np]()
  * libusb_detach_kernel_driver[_np]()
- Factor out setting of non-blocking flag inside libusb.
- Add missing NULL check after libusb_get_device() call.
- Correct some wrong error codes due to copy and paste error.

PR:	usb/150546
Submitted by:	Robert Jenssen, Alexander Leidinger
Approved by:    thompsa (mentor)
2010-10-14 20:50:33 +00:00
hselasky
f4157327e6 LibUSB (new API):
- Add a new API function to check the connected
status of the USB handle in the LibUSB v1.0 and
LibUSB v0.1 interfaces.

Approved by:    thompsa (mentor)
2010-10-14 20:04:36 +00:00
joel
f4e8725880 Fix typos and spelling mistakes. 2010-08-06 14:33:42 +00:00
joel
60754e9168 Spelling fixes. 2010-08-03 17:40:09 +00:00
alfred
6c89a5f102 LibUSB v1.0:
- Significantly improve libusb10 support.
        - Many minor issues fixed.
        - P4 ID: 166189, 165853, 165991, 166052, 166069

Submitted by:	hps
Approved by:	re
2009-07-30 00:11:41 +00:00
thompsa
1a82c9d313 Add libusb 1.0 support which is compatible with the latest revision on
Sourceforge. Libusb 1.0 is a portable usb api released December 2008 and
supersedes the original libusb released 10 years ago, it supports isochronous
endpoints and asynchronous I/O.  Many applications have already started using
the interfaces.

This has been developed as part of Google Summer of Code this year by Sylvestre
Gallon and has been cribbed early due to it being desirable in FreeBSD 8.0

Submitted by:	Sylvestre Gallon
Sponsored by:	Google Summer of Code 2009
Reviewed by:	Hans Petter Selasky
2009-06-23 01:00:26 +00:00
thompsa
c9ef77f0ce Cleanup claim/release interface code, which is specific to libusb v0.1. Remove
claim and release interface support from libusb v2.0, because it is not useful.

Submitted by:	Hans Petter Selasky
2009-06-12 16:07:06 +00:00
thompsa
6425a0a49f Add libusb20_tr_get_length to get the transfer length.
Submitted by:	Hans Petter Selasky
2009-06-02 17:27:51 +00:00
thompsa
af6fb4f3d2 s/usb2_/usb_/ on all C structs for the USB stack. 2009-05-28 17:36:36 +00:00
thompsa
9e6a2d60a5 Fix libusb20_dev_get_device_desc and defunt xref.
Submitted by:	Hans Petter Selasky
2009-05-21 17:16:35 +00:00
thompsa
12e05b4a4b MFp4 //depot/projects/usb@159934
Update libusb function descriptions.

Submitted by:	Chuck Robey
2009-04-05 18:30:24 +00:00
thompsa
0a8a5a5f61 Update libusb.3 name and add mlinks for usb.3 and libusb20.3 2009-03-10 15:49:43 +00:00