On Sun, Jun 7, 2009 at 4:45 AM, Jack Twilley<[email protected]> wrote: > I have been looking through the source to usbconfig and other tools trying > to figure out how to retrieve the iManufacturer and iProduct strings. The > libusb20 man page describes the libusb20_dev_get_device_desc() function but > there's no useful information on the struct it returns. The include file > looks as if the struct is automagically generated by macros within macros > which is too complicated for me to figure out without help. Any ideas? > There's gotta be a better way than using LIBUSB20_DEVICE_DESC()... > > Jack.
You can use the function libusb20_dev_get_device_desc() that returns a struct LIBUSB20_DEVICE_DESC_DECODED *. The field idVendor and idProduct in the struct LIBUSB20_DEVICE_DESC_DECODED are what you are looking for :) Cheers, -- Sylvestre Gallon (http://devsyl.blogspot.com) Fifth Grade Student @ Epitech & Researcher @ LSE R&D @ Rathaxes (http://www.rathaxes.org) _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, send any mail to "[email protected]"
