From 16241aafa780ebf188b2ceb96d51bf5af5d6bbe2 Mon Sep 17 00:00:00 2001 From: aqua Date: Sun, 4 Dec 2022 16:25:08 +0200 Subject: Remove custom include paths in makefiles Add symlinks target to top-level makefile --- devices/Makefile | 2 -- devices/uart.h | 17 +++++++++++++++++ devices/uart_16550.c | 4 ++-- devices/uart_16550.h | 18 ------------------ devices/vga.c | 4 ++-- 5 files changed, 21 insertions(+), 24 deletions(-) create mode 100644 devices/uart.h delete mode 100644 devices/uart_16550.h (limited to 'devices') diff --git a/devices/Makefile b/devices/Makefile index 3b7f163..0c3a0b1 100644 --- a/devices/Makefile +++ b/devices/Makefile @@ -1,7 +1,5 @@ include ../Makefile.config -CCFLAGS += -I. -I../${ARCH} -I../lib - devs.SRCS = pic_8259.c uart_16550.c vga.c i8042.c pckbd.c mouse.c include ../rules.mk diff --git a/devices/uart.h b/devices/uart.h new file mode 100644 index 0000000..ee74e98 --- /dev/null +++ b/devices/uart.h @@ -0,0 +1,17 @@ +#pragma once + +// TODO #include +#include + +enum UART { + COM1 = 0x3f8, + COM2 = 0x2f8, + COM3 = 0x3E8, + COM4 = 0x2E8, + COM5 = 0x5F8, + COM6 = 0x4F8, + COM7 = 0x5E8, + COM8 = 0x4E8, +}; + +FILE *uart_init(enum UART port); diff --git a/devices/uart_16550.c b/devices/uart_16550.c index 40ac594..1adcf38 100644 --- a/devices/uart_16550.c +++ b/devices/uart_16550.c @@ -1,4 +1,4 @@ -#include "uart_16550.h" +#include "uart.h" #include #include @@ -83,7 +83,7 @@ uart_puts(const FILE *self, const char *string, int length) } void -uart_flush(const FILE *self) +uart_flush(__attribute__((unused)) const FILE *self) { } diff --git a/devices/uart_16550.h b/devices/uart_16550.h deleted file mode 100644 index 5e5ee13..0000000 --- a/devices/uart_16550.h +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once - -#include - -enum UART { - COM1 = 0x3f8, - COM2 = 0x2f8, - COM3 = 0x3E8, - COM4 = 0x2E8, - COM5 = 0x5F8, - COM6 = 0x4F8, - COM7 = 0x5E8, - COM8 = 0x4E8, -}; - -FILE *uart_init(enum UART port); -// void uart_write(enum UART port, char a); -// int uart_puts(enum UART port, const char *string, int length); diff --git a/devices/vga.c b/devices/vga.c index 12ac880..6d64c0a 100644 --- a/devices/vga.c +++ b/devices/vga.c @@ -57,7 +57,7 @@ vga_update_cursor() // *** Text Mode Output *** void -vga_putc(const FILE *self, char a) +vga_putc(__attribute__((unused)) const FILE *self, char a) { switch (a) { case '\n': @@ -115,7 +115,7 @@ vga_puts(const FILE *self, const char *string, int len) } void -vga_flush(const FILE *self) +vga_flush(__attribute__((unused)) const FILE *self) { vga_update_cursor(); } -- cgit v1.2.1