From a33f60fea30c931207aa05c933dab4bd992a40c2 Mon Sep 17 00:00:00 2001 From: Robert Morris Date: Sat, 27 Jul 2019 05:47:19 -0400 Subject: console/uart tweaks --- kernel/uart.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'kernel/uart.c') 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) { -- cgit v1.2.3