|
From: Alan S. <st...@ro...> - 2011-07-06 18:59:41
|
On Fri, 1 Jul 2011, Pete Batard wrote: > On 2011.07.01 15:57, Alan Stern wrote: > > So far not much has been written (I think part of this was implemented > > in the Windows port of libusb). > > The following have been in my branch for some time (libusb.h [1], line 890): > > uint8_t LIBUSB_CALL libusb_get_port_number(libusb_device *dev); > libusb_device * LIBUSB_CALL libusb_get_parent(libusb_device *dev); > int LIBUSB_CALL libusb_get_port_path(libusb_context *ctx, libusb_device > *dev, uint8_t* path, uint8_t path_length); > > Currently, these calls will return an error for OSX and Linux, but > should work on Windows. As a matter of fact, the xusb sample will > automatically display some topology information when ran on Windows. eg: > > bus: 7, port path from HCD: 4->4->1 > > If anybody wants to send a Linux or Mac implementation for the calls > above, I'd be happy to include it in my branch. Okay, I have an implementation for the Linux backend. There's also a fix for the xusb program. Two patches follow. Alan Stern |