libftdi Archives

Subject: RE: how to set receieve event in libftdi-0.18

From: "Michael Plante" <michael.plante@xxxxxxxxx>
To: <libftdi@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 17 Mar 2011 23:41:23 -0400
Xiaofan Chen wrote:
>> 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.


FWIW, d2xx passes the event handle off in an IOCTL to ftdibus.sys.  I don't
feel like tracing it very far.  But the event is set in a "system thread"
within the driver.  So no real surprise that some thread is doing the dirty
work there.  (This was a very cursory look, so take that with a grain of
salt.)

But looking again at your code, it looks like you're just waiting for data
to be ready for 1 sec, and failing if it's not.  Why not just issue a
1-second blocking/synchronous read for the maximum size you expect to
receive?

Regards,
Michael


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

Current Thread