[ECOS] Interrupts and Serial Ports

Steve Knowlton sknowlton@custom-mfg-eng.com
Fri Nov 5 13:33:00 GMT 2004

I have an EB40A board. I am trying to read an incoming data stream on 
Serial Port 1
that arrives about every 15 sec. I can see the Rx LED on the port 
flashing every time
a packet arrives.

I am trying to read data coming into the port using cyg_io_read using a 
polling method.

I was reading the documentation on the ecos serial driver and it claims 
that the
incoming data is buffered until it is read. Is this true because it 
doesn't seem to work
that way. I never seem to read anything from the port. I have tried both 
and non blocking reads. Occassionally I get a -11 error which means that 
the data is
not available and that the user should try again later. The returned 
length is always 0 so
that seems to prove that I am not reading anything.

This does not seem to be a very good method and I was wondering if there 
is an ecos interrrupt routine I can use that would execute whenever data 
arrives at the port.
Presumably ecos assigns an interrupt vector for the port. If so, how can 
I use this?



Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

More information about the Ecos-discuss mailing list