summaryrefslogtreecommitdiffstats
path: root/lib/libusb/libusb20.3
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2011-06-24 11:14:09 +0000
committerhselasky <hselasky@FreeBSD.org>2011-06-24 11:14:09 +0000
commit7549fd80dceb76179c8bba85df341a74e670d373 (patch)
tree9880fbd33f8a6cbdcce3e25ce3d8a0726fbaf728 /lib/libusb/libusb20.3
parentc1214139ee347d79c2659ca792a5dd27cbd0c9b1 (diff)
downloadFreeBSD-src-7549fd80dceb76179c8bba85df341a74e670d373.zip
FreeBSD-src-7549fd80dceb76179c8bba85df341a74e670d373.tar.gz
- Add two new API's to libusb20 which can be used to retrive information
about the parent USB device: - libusb20_dev_get_parent_address - libusb20_dev_get_parent_port - Rename libusb20_compat01.c into libusb01.c MFC after: 3 days
Diffstat (limited to 'lib/libusb/libusb20.3')
-rw-r--r--lib/libusb/libusb20.323
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/libusb/libusb20.3 b/lib/libusb/libusb20.3
index 93dfe18..042f885 100644
--- a/lib/libusb/libusb20.3
+++ b/lib/libusb/libusb20.3
@@ -159,6 +159,10 @@ USB access library (libusb -lusb)
.Ft uint8_t
.Fn libusb20_dev_get_address "struct libusb20_device *pdev"
.Ft uint8_t
+.Fn libusb20_dev_get_parent_address "struct libusb20_device *pdev"
+.Ft uint8_t
+.Fn libusb20_dev_get_parent_port "struct libusb20_device *pdev"
+.Ft uint8_t
.Fn libusb20_dev_get_bus_number "struct libusb20_device *pdev"
.Ft uint8_t
.Fn libusb20_dev_get_mode "struct libusb20_device *pdev"
@@ -756,12 +760,31 @@ is an internal function to allocate a new USB device.
.Fn libusb20_dev_get_address
returns the internal and not necessarily the real
hardware address of the given USB device.
+Valid addresses start at one.
+.
+.Pp
+.
+.Fn libusb20_dev_get_parent_address
+returns the internal and not necessarily the real hardware address of
+the given parent USB HUB device.
+This value is zero for the root HUB which usually has a device address
+equal to one.
+Valid addresses start at one.
+.
+.Pp
+.
+.Fn libusb20_dev_get_parent_port
+returns the port number on the parent USB HUB device.
+This value is zero for the root HUB which usually has a device address
+equal to one.
+Valid port numbers start at one.
.
.Pp
.
.Fn libusb20_dev_get_bus_number
returns the internal bus number which the given USB
device belongs to.
+Valid bus numbers start at zero.
.
.Pp
.
OpenPOWER on IntegriCloud