From ef698c633d2ecb597be58deccfa2795cc6c88e25 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mon, 27 May 2013 11:12:28 +0200 Subject: Add superspeed endpoint companion descriptor support Based on earlier work done on this by Maya Erez , Nathan Hjelm and Pete Batard . Signed-off-by: Hans de Goede --- examples/xusb.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'examples') 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; kusb_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); + } } } } -- cgit v1.2.3