diff options
Diffstat (limited to 'lib/libusb/libusb20.3')
-rw-r--r-- | lib/libusb/libusb20.3 | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/lib/libusb/libusb20.3 b/lib/libusb/libusb20.3 index 8d286f13723f..e367bf36a874 100644 --- a/lib/libusb/libusb20.3 +++ b/lib/libusb/libusb20.3 @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 14, 2013 +.Dd May 3, 2013 .Dt LIBUSB20 3 .Os .Sh NAME @@ -114,6 +114,8 @@ USB access library (libusb -lusb) .Ft const char * .Fn libusb20_dev_get_backend_name "struct libusb20_device *" .Ft int +.Fn libusb20_dev_get_port_path "struct libusb20_device *pdev" "uint8_t *buf" "uint8_t bufsize" +.Ft int .Fn libusb20_dev_get_info "struct libusb20_device *pdev" "struct usb_device_info *pinfo" .Ft int .Fn libusb20_dev_get_iface_desc "struct libusb20_device *pdev" "uint8_t iface_index" "char *buf" "uint8_t len" @@ -552,6 +554,20 @@ returns a zero terminated string describing the backend used. . .Pp . +.Fn libusb20_dev_get_port_path +retrieves the list of USB port numbers which the datastream for a given USB device follows. +The first port number is the Root HUB port number. +Then children port numbers follow. +The Root HUB device itself has a port path length of zero. +Valid port numbers start at one and range until and including 255. +Typically there should not be more than 16 levels, due to electrical and protocol limitations. +This functions returns the number of actual port levels upon success +else a LIBUSB20_ERROR value is returned which are always negative. +If the actual number of port levels is greater than the maximum +specified, a LIBUSB20_ERROR value is returned. +. +.Pp +. .Fn libusb20_dev_get_info retrieves the BSD specific usb_device_info structure into the memory location given by .Fa pinfo . |