diff options
author | Hans de Goede <hdegoede@redhat.com> | 2013-05-27 11:12:28 +0200 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2013-05-30 14:20:44 +0200 |
commit | ef698c633d2ecb597be58deccfa2795cc6c88e25 (patch) | |
tree | 574ffb7ed0d5dc5bd7fba7185b190fdec151c724 /examples | |
parent | cedc7f6e289c427c84a9175045b06614be56ec5a (diff) | |
download | android_external_libusbx-ef698c633d2ecb597be58deccfa2795cc6c88e25.tar.gz android_external_libusbx-ef698c633d2ecb597be58deccfa2795cc6c88e25.tar.bz2 android_external_libusbx-ef698c633d2ecb597be58deccfa2795cc6c88e25.zip |
Add superspeed endpoint companion descriptor support
Based on earlier work done on this by Maya Erez <merez@codeaurora.org>,
Nathan Hjelm <hjelmn@me.com> and Pete Batard <pete@akeo.ie>.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/xusb.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/examples/xusb.c b/examples/xusb.c index 5bb92a6..e1b1931 100644 --- a/examples/xusb.c +++ b/examples/xusb.c @@ -808,6 +808,7 @@ static int test_device(uint16_t vid, uint16_t pid) test_mode = USE_SCSI; } for (k=0; k<conf_desc->usb_interface[i].altsetting[j].bNumEndpoints; k++) { + struct libusb_ss_endpoint_companion_descriptor *ep_comp = NULL; endpoint = &conf_desc->usb_interface[i].altsetting[j].endpoint[k]; printf(" endpoint[%d].address: %02X\n", k, endpoint->bEndpointAddress); // Use the first interrupt or bulk IN/OUT endpoints as default for testing @@ -822,6 +823,12 @@ static int test_device(uint16_t vid, uint16_t pid) } printf(" max packet size: %04X\n", endpoint->wMaxPacketSize); printf(" polling interval: %02X\n", endpoint->bInterval); + libusb_get_ss_endpoint_companion_descriptor(NULL, endpoint, &ep_comp); + if (ep_comp) { + printf(" max burst: %02X (USB 3.0)\n", ep_comp->bMaxBurst); + printf(" bytes per interval: %04X (USB 3.0)\n", ep_comp->wBytesPerInterval); + libusb_free_ss_endpoint_companion_descriptor(ep_comp); + } } } } |