Re: [Libusbx-devel] Async API question:

2012-08-10 Thread Kevyn-Alexandre Paré
Hi Tim, Sorry for the delay in the replay was on something else ;) On 2012-07-24, at 12:41 PM, Tim Roberts wrote: > Kevyn-Alexandre Paré wrote: >> Here's the code and output of my test. I'm trying to understand what's going >> wrong! I mean that I'm expe

Re: [Libusbx-devel] Async API question:

2012-07-24 Thread Kevyn-Alexandre Paré
> > I will try to run my test against both git source tree…. Will come back with > the result. > The same result as previously for both git tree (libusb & libusbx). Any advise? thx - KA -- Live Security Virtual Confe

Re: [Libusbx-devel] Async API question:

2012-07-24 Thread Kevyn-Alexandre Paré
Hi Peter, > I think the code looks fine. Try running against libusbx and/or > libusb git source. (It would be interesting to try both, in this > case.) I have tested on both library. The one we have here is libusb 1.0.9rc3 (f07a4a78533b44d124dfe06cbf42afa7fb267359) and libusbx 1.0.12 http://so

[Libusbx-devel] Async API question:

2012-07-23 Thread Kevyn-Alexandre Paré
Hi there, Here's the code and output of my test. I'm trying to understand what's going wrong! I mean that I'm expecting the callback function "cb_xfr" from my bulk transfer to be called after libusb_submit_transfer is called. I'm communicating to a FPGA through a Cypress USB (FX2) and It's work

Re: [Libusbx-devel] Question about libusb_get_pollfds?

2012-07-21 Thread Kevyn-Alexandre Paré
Further progress, - I implement code that register libusb_get_pollfds to my event loop. - I send 6 bytes with libusb_fill_bulk_transfer/libusb_submit_transfer - I then get notify that libusb fd change - I call libusb_handle_events - But my callback is not called. The one that was registered to l

Re: [Libusbx-devel] Question about libusb_get_pollfds?

2012-07-10 Thread Kevyn-Alexandre Paré
Hi Peter, On 2012-07-09, at 5:28 PM, Peter Stuge wrote: > Kevyn-Alexandre Paré wrote: >>> Data never becomes available. >>> The application asks the device to send data, when the application >>> knows that data is supposed to be available in the device. >>

Re: [Libusbx-devel] Question about libusb_get_pollfds?

2012-07-09 Thread Kevyn-Alexandre Paré
Hi Peter, On 2012-07-07, at 5:31 AM, Peter Stuge wrote: > Kevyn-Alexandre Paré wrote: >> 3- In the callback I need to know what the FD is referring to and >> take action, ex: data is ready to be read for the FD of bulk >> transfer. > > This is a misunderstanding of U

Re: [Libusbx-devel] Question about libusb_get_pollfds?

2012-07-06 Thread Kevyn-Alexandre Paré
Hi Tim, On 2012-07-02, at 4:14 PM, Tim Roberts wrote: > Kevyn-Alexandre Paré wrote: >> >>> >>> If timerfd is available on your system, to manage timer expirations >>> through a file descriptor, that's added to the POLLIN list. >> thx, The

Re: [Libusbx-devel] Question about libusb_get_pollfds?

2012-06-26 Thread Kevyn-Alexandre Paré
Hi Tim, On 2012-06-22, at 5:38 PM, Tim Roberts wrote: > Kevyn-Alexandre Paré wrote: >> So by calling the libusb_get_pollfds It return 3 file descriptor. >> >> So my question is why 3? >> >> 2 files descriptor (POLLIN) that could be read. >> 1 file d

[Libusbx-devel] Question about libusb_get_pollfds?

2012-06-22 Thread Kevyn-Alexandre Paré
Hi, I'm trying to integrate libusb, with Cypress FX2, with libev (event loop) by using the "polling and timing" function: http://libusb.sourceforge.net/api-1.0/group__poll.html So by calling the libusb_get_pollfds It return 3 file descriptor. So my question is why 3? 2 files descriptor (POLLI