aboutsummaryrefslogtreecommitdiff
path: root/devices/uart.h
diff options
context:
space:
mode:
Diffstat (limited to 'devices/uart.h')
-rw-r--r--devices/uart.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/devices/uart.h b/devices/uart.h
new file mode 100644
index 0000000..8def000
--- /dev/null
+++ b/devices/uart.h
@@ -0,0 +1,21 @@
+#pragma once
+
+// #include <stdio.h>
+// #include <sys/io.h>
+
+enum UART {
+ COM1 = 0x3f8,
+ COM2 = 0x2f8,
+ COM3 = 0x3e8,
+ COM4 = 0x2e8,
+ COM5 = 0x5f8,
+ COM6 = 0x4f8,
+ COM7 = 0x5e8,
+ COM8 = 0x4e8,
+};
+
+typedef struct {
+ unsigned id;
+} FILE;
+
+FILE *uart_init(enum UART port);