aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorPete Batard <pete@akeo.ie>2012-05-10 20:01:10 +0100
committerPete Batard <pete@akeo.ie>2012-05-28 10:26:44 +0100
commitcfb8610242394d532778a483570089c2bed52c84 (patch)
tree729c43ea4aecb8d4a4b39872820603df72026041 /examples
parenta544e5972bf2b0ac9e006439576f681a8439d311 (diff)
downloadandroid_external_libusbx-cfb8610242394d532778a483570089c2bed52c84.tar.gz
android_external_libusbx-cfb8610242394d532778a483570089c2bed52c84.tar.bz2
android_external_libusbx-cfb8610242394d532778a483570089c2bed52c84.zip
All: Add parent and port topology calls
* Adds libusb_get_port_number, libusb_get_parent and libusb_get_port_path * Linux implementation provided by Alan Stern, OS X by Nathan Hjelm * Unsupported for *BSD platforms
Diffstat (limited to 'examples')
-rw-r--r--examples/xusb.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/examples/xusb.c b/examples/xusb.c
index 65dda7b..d775781 100644
--- a/examples/xusb.c
+++ b/examples/xusb.c
@@ -576,9 +576,7 @@ static int test_device(uint16_t vid, uint16_t pid)
{
libusb_device_handle *handle;
libusb_device *dev;
-#ifdef HAS_GETPORTPATH
uint8_t bus, port_path[8];
-#endif
struct libusb_config_descriptor *conf_desc;
const struct libusb_endpoint_descriptor *endpoint;
int i, j, k, r;
@@ -603,7 +601,6 @@ static int test_device(uint16_t vid, uint16_t pid)
}
dev = libusb_get_device(handle);
-#ifdef HAS_GETPORTPATH
bus = libusb_get_bus_number(dev);
r = libusb_get_port_path(NULL, dev, port_path, sizeof(port_path));
if (r > 0) {
@@ -613,7 +610,6 @@ static int test_device(uint16_t vid, uint16_t pid)
}
printf("\n");
}
-#endif
r = libusb_get_device_speed(dev);
if ((r<0) || (r>4)) r=0;
printf("speed: %s\n", speed_name[r]);