Date: Sun, 7 Jun 2009 15:48:38 +0200 From: Sylvestre Gallon <ccna.syl@gmail.com> To: Jack Twilley <jmt@twilley.org> Cc: freebsd-usb@freebsd.org Subject: Re: How to retrieve iManufacturer/iProduct information from libusb20? Message-ID: <164b4c9c0906070648gb7abd54o967c2daebf6e8032@mail.gmail.com> In-Reply-To: <4A2B29C0.7020709@twilley.org> References: <4A2B29C0.7020709@twilley.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Jun 7, 2009 at 4:45 AM, Jack Twilley<jmt@twilley.org> wrote: > I have been looking through the source to usbconfig and other tools tryin= g > to figure out how to retrieve the iManufacturer and iProduct strings. =A0= The > libusb20 man page describes the libusb20_dev_get_device_desc() function b= ut > there's no useful information on the struct it returns. =A0The include fi= le > looks as if the struct is automagically generated by macros within macros > which is too complicated for me to figure out without help. =A0Any ideas? > =A0There'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, --=20 Sylvestre Gallon (http://devsyl.blogspot.com) Fifth Grade Student @ Epitech & Researcher @ LSE R&D @ Rathaxes (http://www.rathaxes.org)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?164b4c9c0906070648gb7abd54o967c2daebf6e8032>