src/platform/qemu/driver/uart.c
// alternate version of uartputc() that doesn't
// use interrupts, for use by kernel printf() and
// to echo characters. it spins waiting for the uart's
// output register to be empty.
alternate version of uartputc() that doesn't
use interrupts, for use by kernel printf() and
to echo characters. it spins waiting for the uart's
output register to be empty.
alternate version of uartputc () that doesn ' t use interrupts for use by kernel printf () and to echo characters . it spins waiting for the uart ' s output register to be empty .
void
uartputc_sync(int c)
{
    while((ReadReg(LSR) & LSR_TX_IDLE) == 0)
        ;
    WriteReg(THR, c);
}
void uartputc_sync ( int c ) { while ( ( ReadReg ( LSR ) & LSR_TX_IDLE ) == 0 ) ; WriteReg ( THR , c ) ; }
alternate version of uartputc() that doesn't
use interrupts, for use by kernel printf() and
to echo characters.
alternate version of uartputc () that doesn ' t use interrupts for use by kernel printf () and to echo characters .
// wait for Transmit Holding Empty to be set in LSR.