diff options
author | hselasky <hselasky@FreeBSD.org> | 2011-11-09 19:03:26 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2011-11-09 19:03:26 +0000 |
commit | efcd317363664307ce1b8bfa274aa09e83b9ce79 (patch) | |
tree | a83ef3eac79c8b80fbbc2e0b00ac8d6b05361dbb /lib/libusb/libusb.3 | |
parent | ac543d4e5383b18e22ac392479273638cc5d7eca (diff) | |
download | FreeBSD-src-efcd317363664307ce1b8bfa274aa09e83b9ce79.zip FreeBSD-src-efcd317363664307ce1b8bfa274aa09e83b9ce79.tar.gz |
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
Diffstat (limited to 'lib/libusb/libusb.3')
-rw-r--r-- | lib/libusb/libusb.3 | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/lib/libusb/libusb.3 b/lib/libusb/libusb.3 index 7255f2b..4e4dd10 100644 --- a/lib/libusb/libusb.3 +++ b/lib/libusb/libusb.3 @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 16, 2011 +.Dd November 9, 2011 .Dt LIBUSB 3 .Os .Sh NAME @@ -316,6 +316,40 @@ Retrieve a string descriptor in C style ASCII. Returns the positive number of bytes in the resulting ASCII string on success and a LIBUSB_ERROR code on failure. .Pp +.Ft int +.Fn libusb_parse_ss_endpoint_comp "const void *buf" "int len" "libusb_ss_endpoint_companion_descriptor **ep_comp" +This function parses the USB 3.0 endpoint companion descriptor in host endian format pointed to by +.Fa buf +and having a length of +.Fa len. +Typically these arguments are the extra and extra_length fields of the +endpoint descriptor. +On success the pointer to resulting descriptor is stored at the location given by +.Fa ep_comp. +Returns zero on success and a LIBUSB_ERROR code on failure. +On success the parsed USB 3.0 endpoint companion descriptor must be +freed using the libusb_free_ss_endpoint_comp function. +.Pp +.Ft void +.Fn libusb_free_ss_endpoint_comp "libusb_ss_endpoint_companion_descriptor *ep_comp" +This function is NULL safe and frees a parsed USB 3.0 endpoint companion descriptor. +.Pp +.Ft int +.Fn libusb_parse_bos_descriptor "const void *buf" "int len" "libusb_bos_descriptor **bos" +This function parses a Binary Object Store, BOS, descriptor into host endian format pointed to by +.Fa buf +and having a length of +.Fa len. +On success the pointer to resulting descriptor is stored at the location given by +.Fa bos. +Returns zero on success and a LIBUSB_ERROR code on failure. +On success the parsed BOS descriptor must be freed using the +libusb_free_bos_descriptor function. +.Pp +.Ft void +.Fn libusb_free_bos_descriptor "libusb_bos_descriptor *bos" +This function is NULL safe and frees a parsed BOS descriptor. +.Pp .Sh USB ASYNCHRONOUS I/O .Pp .Ft struct libusb_transfer * |