On Fri, Jun 22, 2012 at 4:04 PM, Thomas Heller <[email protected]> wrote: > Am 18.06.2012 21:31, schrieb mxb7642: > >> Hmmmm.... I implemented the patch and am still having issues. I used the >> clock function from time.h instead of GetTickCount. Now I am getting the >> error -127 instead. I am sure my device is sending data as I have tested >> it >> on Windows using FTDI's FTD2XX library. > > > Yes, there's still a bug in the patch. I'm working on a new patch, > but don't hold your breath. > > Again the question: Are we two the only users of libftdi who need this > functionality? >
Just wondering if you are using libftdi-1.0 or libftdi-0.x? If you are using libftdi-1.0, I am thinking one fo the solution is to modify the sync API ftdi_read_data() to be based on the async API ftdi_read_data_submit() and ftdi_transfer_data_done(). Similarly, the sync API ftdi_write_data() to be based on the async API ftdi_write_data_submit() and ftdi_transfer_data_done(). In that case, the two sync API can add a timeout parameter. The idea is from libusb-1.0's sync API which is on top of the sync API. http://libusbx.git.sourceforge.net/git/gitweb.cgi?p=libusbx/libusbx;a=blob;f=libusb/sync.c;hb=HEAD Does this make any sense? -- Xiaofan -- libftdi - see http://www.intra2net.com/en/developer/libftdi for details. To unsubscribe send a mail to [email protected]
