summaryrefslogtreecommitdiff
path: root/uart.c
diff options
context:
space:
mode:
Diffstat (limited to 'uart.c')
-rw-r--r--uart.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/uart.c b/uart.c
index 29f6df4..35fac1b 100644
--- a/uart.c
+++ b/uart.c
@@ -46,6 +46,9 @@ uartinit(void)
void
uartputc(int c)
{
+ // wait for Transmit Holding Empty to be set in LSR.
+ while((*R(5) & (1 << 5)) == 0)
+ ;
*R(0) = c;
}