This is the mail archive of the
ecos-discuss@sourceware.cygnus.com
mailing list for the eCos project.
Re: inital patch for PID driver
- To: ecos-discuss at sourceware dot cygnus dot com
- Subject: [ECOS] Re: inital patch for PID driver
- From: Jesper Skov <jskov at redhat dot com>
- Date: Fri, 9 Jun 2000 10:02:02 +0200
[sorry, no X-ref to the original article since it never appeared via
the News feed]
Dave,
I've committed your patch with some minor changes to the DSR code:
while ((isr = port->REG_isr & 0x0E) != 0) {
if (isr == ISR_Tx) {
(chan->callbacks->xmt_char)(chan);
} else if (isr == ISR_RxTO || isr == ISR_Rx) {
while(port->REG_lsr & LSR_RSR)
(chan->callbacks->rcv_char)(chan, port->REG_rhr);
}
}
Both TO and Rx conditions should empty the FIFO. And while the
previous implementation would not have caused bytes to be lost, it
would have caused a separate interrupt for each character in the
FIFO. So the changed code is more efficient, if nothing else.
Thanks,
Jesper