From fbc736463f2ca2f5dbf1b7c412f408245e61df97 Mon Sep 17 00:00:00 2001 From: aqua Date: Sun, 12 Mar 2023 18:39:39 +0200 Subject: Revert VGA C driver --- i686/sys/io.h | 10 ---------- i686/sys/io.hpp | 33 --------------------------------- 2 files changed, 43 deletions(-) delete mode 100644 i686/sys/io.hpp (limited to 'i686/sys') diff --git a/i686/sys/io.h b/i686/sys/io.h index b6c24c5..da586b9 100644 --- a/i686/sys/io.h +++ b/i686/sys/io.h @@ -11,16 +11,6 @@ enum UART { COM7 = 0x5e8, COM8 = 0x4e8, }; -enum UARTPortOffset { - Data = 0, // read from receive buffer / write to transmit buffer | BaudDiv_l - InterruptControl = 1, // interrupt enable | BaudDiv_h - FifoControl = 2, // interrupt ID and FIFO control - LineControl = 3, // most significant bit is the DLAB - ModemControl = 4, - LineStatus = 5, - ModemStatus = 6, - Scratch = 7, -}; static inline void outb(unsigned char val, unsigned short port) diff --git a/i686/sys/io.hpp b/i686/sys/io.hpp deleted file mode 100644 index 9759a3a..0000000 --- a/i686/sys/io.hpp +++ /dev/null @@ -1,33 +0,0 @@ -#pragma once - -/** - * Ports provide communication with devices on the x86 IO bus. - */ -template struct Port { - /** - * Read value from port - */ - static T - in(unsigned short offset = 0) - { - if constexpr (sizeof(T) == sizeof(unsigned char)) return inb(port + offset); - else if constexpr (sizeof(T) == sizeof(unsigned short)) - return inw(port + offset); - else if constexpr (sizeof(T) == sizeof(unsigned int)) - return inl(port + offset); - } - - /** - * Write value to port - */ - static void - out(T val, unsigned short offset = 0) - { - if constexpr (sizeof(T) == sizeof(unsigned char)) outb(val, port + offset); - else if constexpr (sizeof(T) == sizeof(unsigned short)) - outw(val, port + offset); - else if constexpr (sizeof(T) == sizeof(unsigned int)) - outl(val, port + offset); - } - -}; -- cgit v1.2.1