This is the mail archive of the ecos-discuss@sourceware.cygnus.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]

Re: inital patch for PID driver


[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

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