This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
How to handle serial port input?
- To: <ecos-discuss at sourceware dot cygnus dot com>
- Subject: [ECOS] How to handle serial port input?
- From: "Tom Vandeplas" <tom dot vandeplas at 4g-radio dot com>
- Date: Tue, 19 Jun 2001 17:21:55 +0200
Hi,
I'm working on a Cirrus edb7212 board. I would like to write a thread to
handle input on the serial port. The ideal would be that the thread
continues as long as there's data available.
I read the "simple serial" driver, as I understand any input to a serial
port is written to a buffer by the kernel, by using "cyg_io_read" one can
read this buffer... is this correct?
If this is correct, how can I know when to read this buffer, polling it all
the time would be a disaster for performance. Is there some way to attach an
interrupt to this or even better is there a synchrioniation primitive
available?
Any input or examples are welcome
Thx, Tom