Re: [Libusbx-devel] libusb_open_device_with_vid_pid () on a composite device

2013-07-10 Thread igx deepak
Xiaofan / Chris, Thanks for clarifications. I was using the same procedure as you mentioned. Just asked to verify what I feel is right! Thanks Again On Wed, Jul 10, 2013 at 3:19 PM, Xiaofan Chen wrote: > On Wed, Jul 10, 2013 at 1:50 PM, igx deepak wrote: > > Hi All, > > > > If the function li

[Libusbx-devel] [PATCH] core: Fix error in signed vs. unsigned comparison in handle_events()

2013-07-10 Thread Chris Dickens
For messages received on the hotplug pipe, the message was read via usbi_read() (ssize_t) and compared against the size of the message struct (size_t). usbi_read() returns -1 on an error condition, so some systems can cast the ssize_t to size_t for the comparison, making it equal to SIZE_MAX and ca

Re: [Libusbx-devel] libusb_open_device_with_vid_pid () on a composite device

2013-07-10 Thread Xiaofan Chen
On Wed, Jul 10, 2013 at 1:50 PM, igx deepak wrote: > Hi All, > > If the function libusb_open_device_with_vid_pid() is used for a Composite > device exposing multiple interfaces, will it open the composite device or a > particular interface?? Please read the libusbx API documents. Ref: http://libu

Re: [Libusbx-devel] libusb_open_device_with_vid_pid () on a composite device

2013-07-10 Thread Chris Dickens
Hi, libusb_open_device_with_vid_pid() opens the composite device and returns you a device handle. This process does not claim any interface. Performing any device functions (e.g. claim/release interface, get/set configuration, read/write, etc.) requires a device handle, so you can use what you ge