summaryrefslogtreecommitdiff
path: root/src/kernel/arch/i386/tty/tty.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/arch/i386/tty/tty.c')
-rw-r--r--src/kernel/arch/i386/tty/tty.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/kernel/arch/i386/tty/tty.c b/src/kernel/arch/i386/tty/tty.c
index bae65c5..5a65221 100644
--- a/src/kernel/arch/i386/tty/tty.c
+++ b/src/kernel/arch/i386/tty/tty.c
@@ -11,6 +11,11 @@ void tty_init(void) {
serial_write("<3 ", 3);
}
+void tty_read(char *buf, size_t len) {
+ for (size_t i = 0; i < len; i++)
+ buf[i] = serial_read();
+}
+
void tty_write(const char *buf, size_t len) {
vga_write(buf, len);
serial_write(buf, len);