This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

How to handle serial port input?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]