This is the mail archive of the ecos-discuss@sourceware.org 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]
Other format: [Raw text]

Re: Generic 16x5x serial driver use of transmit FIFO (was: DSR Scheduling Problem)


daniel.neri@sigicom.se (Daniel NÃri) writes:

> Nick Garnett <nickg@ecoscentric.com> writes:
> 
> > Actually, it doesn't.
> 
> I think you're wrong.
> 
> > This already happens. pc_serial_putc() returns true or false,
> > depending on whether it transmitted the byte. In the 16550 this means
> > that it will only return false when the FIFO fills up.
> 
> No. LSR bit 5 (THE) is set when the TX FIFO is empty, not when it's
> non-full.
> 
> > The generic serial code calls the putc() driver routine in a loop to
> > transmit bytes until it returns false.
> 
> Writing to the THR clears the THE so it will typically return false
> after the first byte, and the FIFO will never fill up.

Oh, yes, you're right. Other UARTs have better behaviour in this
regard, and I was assuming that the 16550 did the right thing here
too. I guess this is a pitfall of dealing with legacy hardware. :-(

-- 
Nick Garnett                                     eCos Kernel Architect
http://www.ecoscentric.com                The eCos and RedBoot experts


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


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