diff options
-rw-r--r-- | apps/test.c | 5 | ||||
-rw-r--r-- | kernel/Makefile | 1 | ||||
-rw-r--r-- | kernel/drivers/serial.c (renamed from libc/serial.c) | 2 | ||||
-rw-r--r-- | kernel/inc/serial.h (renamed from libc/inc/serial.h) | 1 | ||||
-rw-r--r-- | libc/Makefile | 1 | ||||
-rw-r--r-- | libc/print.c | 2 |
6 files changed, 4 insertions, 8 deletions
diff --git a/apps/test.c b/apps/test.c index 6e4abde..80f24ad 100644 --- a/apps/test.c +++ b/apps/test.c @@ -5,7 +5,6 @@ #include <math.h> #include <mem.h> #include <print.h> -#include <serial.h> #include <str.h> #include <sys.h> @@ -74,10 +73,6 @@ TEST(mem) int main(void) { - // Serial connection - serial_install(); - serial_print("\nConnected testing.\n"); - test_math(); test_conv(); test_mem(); diff --git a/kernel/Makefile b/kernel/Makefile index 5e5b752..9cf18e5 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -3,6 +3,7 @@ COBJS = main.o \ drivers/interrupts.o \ drivers/interrupts_asm.o \ + drivers/serial.o \ drivers/keyboard.o \ drivers/mouse.o \ drivers/pci.o \ diff --git a/libc/serial.c b/kernel/drivers/serial.c index b11ac26..98108eb 100644 --- a/libc/serial.c +++ b/kernel/drivers/serial.c @@ -21,7 +21,7 @@ static int is_transmit_empty(void) return inb(0x3f8 + 5) & 0x20; } -static void serial_put(char ch) +void serial_put(char ch) { while (is_transmit_empty() == 0) ; diff --git a/libc/inc/serial.h b/kernel/inc/serial.h index 4d04d6a..7ca5ac2 100644 --- a/libc/inc/serial.h +++ b/kernel/inc/serial.h @@ -5,5 +5,6 @@ void serial_install(void); void serial_print(const char *data); +void serial_put(char ch); #endif diff --git a/libc/Makefile b/libc/Makefile index eb79983..9ac6c67 100644 --- a/libc/Makefile +++ b/libc/Makefile @@ -7,7 +7,6 @@ COBJS = sanitize.o \ math.o \ conv.o \ print.o \ - serial.o \ cpu.o \ sys.o \ list.o \ diff --git a/libc/print.c b/libc/print.c index ef51e1f..91ecf8f 100644 --- a/libc/print.c +++ b/libc/print.c @@ -6,7 +6,6 @@ #include <cpu.h> #include <def.h> #include <mem.h> -#include <serial.h> #include <str.h> static void append(char *dest, char *src, int index) @@ -160,6 +159,7 @@ int print(const char *str) // The kernel prints everything into the serial console #include <proc.h> +#include <serial.h> #define RED "\x1B[1;31m" #define GRN "\x1B[1;32m" #define YEL "\x1B[1;33m" |