diff options
author | Pete Batard <pbatard@gmail.com> | 2011-01-20 12:46:02 +0000 |
---|---|---|
committer | Pete Batard <pbatard@gmail.com> | 2011-01-20 12:56:45 +0000 |
commit | 1363b3af3227367c7c5699ac28ea3386c1907914 (patch) | |
tree | 20642993920033048ac0342ce83a41a992f65b8b | |
parent | 453b8bd631084b561a7a1e99e54e9f8a96a7940c (diff) | |
download | libusb-1363b3af3227367c7c5699ac28ea3386c1907914.tar.gz |
added topology information retrieval to xusbpbr327
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | examples/xusb.c | 4 | ||||
-rw-r--r-- | libusb/libusb_version.h | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 26f2389..0083d1b 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ m4_define(LIBUSB_MAJOR, [1]) m4_define(LIBUSB_MINOR, [0]) m4_define(LIBUSB_MICRO, [8]) -m4_define(LIBUSB_NANO, [10326]) +m4_define(LIBUSB_NANO, [10327]) AC_INIT([libusb], LIBUSB_MAJOR.LIBUSB_MINOR.LIBUSB_MICRO, [libusb-devel@lists.sourceforge.net], [libusb], [http://www.libusb.org/]) diff --git a/examples/xusb.c b/examples/xusb.c index 58bb6da..f701b2c 100644 --- a/examples/xusb.c +++ b/examples/xusb.c @@ -606,6 +606,7 @@ int test_device(uint16_t vid, uint16_t pid) { libusb_device_handle *handle; libusb_device *dev; + struct libusb_device_topology topology; struct libusb_config_descriptor *conf_desc; const struct libusb_endpoint_descriptor *endpoint; int i, j, k, r; @@ -629,6 +630,9 @@ int test_device(uint16_t vid, uint16_t pid) } dev = libusb_get_device(handle); + if (libusb_get_device_topology(dev, &topology) == LIBUSB_SUCCESS) { + printf("bus: %d, port: %d, depth: %d\n", topology.bus, topology.port, topology.depth); + } printf("\nReading device descriptor:\n"); CALL_CHECK(libusb_get_device_descriptor(dev, &dev_desc)); diff --git a/libusb/libusb_version.h b/libusb/libusb_version.h index 4c047bd..1dc070d 100644 --- a/libusb/libusb_version.h +++ b/libusb/libusb_version.h @@ -24,6 +24,6 @@ #define LIBUSB_VERSION_MAJOR 1 #define LIBUSB_VERSION_MINOR 0 #define LIBUSB_VERSION_MICRO 8 -#define LIBUSB_VERSION_NANO 10326 +#define LIBUSB_VERSION_NANO 10327 #endif |