libftdi Archives

Subject: Re: how to realize read timeout in libftdi-0.18

From: Xiaofan Chen <xiaofanc@xxxxxxxxx>
To: "Wu, Ruiyu (GE Healthcare)" <RuiyuWu@xxxxxx>
Cc: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Wed, 23 Mar 2011 07:35:30 +0800
2011/3/22 Wu, Ruiyu (GE Healthcare) <RuiyuWu@xxxxxx>:
> 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.

No the patch is for both Linux and Win32. And I believe it is
for both libftdi and libftdi-1.0. Read that thread once again.

> 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?


-- 
Xiaofan

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

Current Thread