From e263c4bb5e918bd217373adc3ada5cd9ab904cf1 Mon Sep 17 00:00:00 2001 From: EmulatedSeasons <89668582+EmulatedSeasons@users.noreply.github.com> Date: Mon, 20 Jan 2025 13:38:20 -0500 Subject: oh --- kernel/include/io.h | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 kernel/include/io.h diff --git a/kernel/include/io.h b/kernel/include/io.h deleted file mode 100644 index b99f0ef..0000000 --- a/kernel/include/io.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef HW_IO_H -#define HW_IO_H - -#include - -// Used for io access - -static inline void outb(uint16_t port, uint8_t val) -{ - asm volatile ( "outb %0, %1" : : "a"(val), "Nd"(port) :"memory"); - /* There's an outb %al, $imm8 encoding, for compile-time constant port numbers that fit in 8b. (N constraint). - * Wider immediate constants would be truncated at assemble-time (e.g. "i" constraint). - * The outb %al, %dx encoding is the only option for all other cases. - * %1 expands to %dx because port is a uint16_t. %w1 could be used if we had the port number a wider C type */ -} - -static inline uint8_t inb(uint16_t port) -{ - uint8_t ret; - asm volatile ( "inb %1, %0" - : "=a"(ret) - : "Nd"(port) - : "memory"); - return ret; -} - -static inline void io_wait(void) -{ - outb(0x80, 0); -} - -#endif \ No newline at end of file -- cgit v1.2.3-70-g09d2