From 9f16b032d38613ca95e321e1d1e652c43129c68b Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sat, 15 Aug 2020 17:42:36 +0200 Subject: Added libgui --- lib/serial.c | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 lib/serial.c (limited to 'lib/serial.c') diff --git a/lib/serial.c b/lib/serial.c deleted file mode 100644 index 28de140..0000000 --- a/lib/serial.c +++ /dev/null @@ -1,34 +0,0 @@ -// MIT License, Copyright (c) 2020 Marvin Borner - -#include -#include -#include - -void serial_install() -{ - outb(0x3f8 + 1, 0x00); - outb(0x3f8 + 3, 0x80); - outb(0x3f8 + 0, 0x03); - outb(0x3f8 + 1, 0x00); - outb(0x3f8 + 3, 0x03); - outb(0x3f8 + 2, 0xC7); - outb(0x3f8 + 4, 0x0B); -} - -int is_transmit_empty() -{ - return inb(0x3f8 + 5) & 0x20; -} - -void serial_put(char ch) -{ - while (is_transmit_empty() == 0) - ; - outb(0x3f8, (u8)ch); -} - -void serial_print(const char *data) -{ - for (u32 i = 0; i < strlen(data); i++) - serial_put(data[i]); -} -- cgit v1.2.3