On Monday, 31. August 2015 10:58:43 Bryan.Richmond@xxxxxxxxxxx wrote:
> I'm trying to figure out a way to find out which usb port a device is
> connected to. I have mulitiple of the same type of FT2232H chips hooked
> up. libusb has this command libusb_get_port_numbers. but it takes a
> libusb_device as an argument.
>
> I tried to use libusb_get_device((&ftdic)->usb_dev), but this gave me a
> segfault.
The construct
"(&ftdic)->usb_dev"
looks a bit unusual. Please show the full variable
declaration of "ftdic" if this problem is still of concern.
Also, if you get a segfault, you can always
try to run your program with "valgrind" or gdb
to get a meaningful stacktrace.
Best regards,
Thomas
--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
|