libftdi Archives

Subject: Question about ftdi_read_data().

From: Teunis van Beelen <teuniz@xxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Wed, 20 Jan 2010 14:03:46 +0100
I started to implement libftdi on Linux. Everything seems to work
sofar except for one thing.

It seems that the function ftdi_read_data() blocks till it has
received the requested amount of bytes.
I don't like this behaviour, I would like it to return immediately. Is
it possible to change this behaviour?

Is it possible to get the number of bytes in the receivebuffer so that
I can use this number in the call
to ftdi_read_data()?

In my program, ftdi_read_data() is called from a timer so a
non-blocking read-function is what I need.
Using threads is not an option.

Regards,

Teunis

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

Current Thread