libftdi Archives

Subject: how to realize read timeout in libftdi-0.18

From: "Wu, Ruiyu (GE Healthcare)" <RuiyuWu@xxxxxx>
To: "Xiaofan Chen" <xiaofanc@xxxxxxxxx>
Cc: <libftdi@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 22 Mar 2011 11:26:11 +0800
 
hi, xiao fan

now I have a concern about ftdi_read_data().
I would expect that the ftdi_read_data() call returns when either the 
requested number of bytes has been read or when zero of fewer then the 
requested number of bytes has been read and the timeout happened. 

However the present implementation returns immediate, without waiting the 
usb_read_timeout.

Somebody else also have met the same problem:libftdi: Make ftdi_read_data() 
honor usb_read_timeout
http://libftdi.141977.n3.nabble.com/libftdi-Make-ftdi-read-data-honor-usb-read-timeout-td922442.html

The patch "gettimeofday " is for libftdi-1.0 and win32
but, I now use the libftdi-0.18 and write linux API.
I wonder whether there is the patch for libftdi-0.18 ?
Do you have any other idea to realize the read time out or  blocken reading?

thank you!




-----Original Message-----
From: Xiaofan Chen [mailto:xiaofanc@xxxxxxxxx] 
Sent: 2011年3月18日 11:30
To: Wu, Ruiyu (GE Healthcare)
Cc: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Subject: Re: how to set receieve event in libftdi-0.18

On Fri, Mar 18, 2011 at 11:18 AM, Wu, Ruiyu (GE Healthcare) <RuiyuWu@xxxxxx> 
wrote:
>
> Thank you .
> I know the FTDI D2xx library, but it is for X86 cpu processor, no for ARM 
> processor.
> Because of the source code shortage of FTDI D2xx , I use the libftdi in 
> repalce.
> I can re-compile the library of linftdi-0.18 for my ARM cpu.

I see. In that case, you have to use libftdi.

--
Xiaofan

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx

Current Thread