>>>>> "Anton" == Anton A Litvinov <mirteney@xxxxxxxxx> writes:
Anton> Hello I am writing a program that should a) continuously read
Anton> data from FTDI-port in the background and store it into file. b)
Anton> receive some commands from stdin and do appropriate writes into
Anton> FTDI-port
Anton> Questions 1. can a) and b) run in different threads or I should
Anton> place read and write into a cycle in one thread and read(stdin)
Anton> -- in another ? and establish link beetween one to another by
Anton> means of queue (fifo) ?
Anton> 2. or maybe I should use some kind of non-blocking read ?
It all depends on data rate and reliability requirements. You can have a
look at ftdi_stream.c in libftdi-1.0 and the discussion around it. It should
give you a goos start.
Bye
--
Uwe Bonnes bon@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
|