summaryrefslogtreecommitdiff
path: root/kernel/uart.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/uart.c')
-rw-r--r--kernel/uart.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/uart.c b/kernel/uart.c
index b8dd664..ba66237 100644
--- a/kernel/uart.c
+++ b/kernel/uart.c
@@ -43,6 +43,7 @@ uartinit(void)
*R(1) = 0x01;
}
+// write one output character to the UART.
void
uartputc(int c)
{
@@ -52,6 +53,8 @@ uartputc(int c)
*R(0) = c;
}
+// read one input character from the UART.
+// return -1 if none is waiting.
int
uartgetc(void)
{
@@ -63,6 +66,7 @@ uartgetc(void)
}
}
+// trap.c calls here when the uart interrupts.
void
uartintr(void)
{