[EMAIL PROTECTED] (Daniel Néri) writes: > Nick Garnett <[EMAIL PROTECTED]> 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
