This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Interrupts and Serial Ports
- From: Steve Knowlton <sknowlton at custom-mfg-eng dot com>
- To: ecos-discuss at sources dot redhat dot com
- Date: Fri, 05 Nov 2004 08:33:07 -0500
- Subject: [ECOS] Interrupts and Serial Ports
- Reply-to: sknowlton at custom-mfg-eng dot com
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
blocking
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?
Thanks
Steve
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss