#pragma once #ifdef __ARCH__ #include #include #else // from stdio typedef struct FILE { int id; void (*putc)(const struct FILE *, char); int (*puts)(const struct FILE *, const char *, int); void (*flush)(const struct FILE *); } FILE; // from sys/io unsigned char inb(unsigned short); void outb(unsigned char, unsigned short); enum UART { COM1 = 0x3f8, COM2 = 0x2f8, COM3 = 0x3e8, COM4 = 0x2e8, COM5 = 0x5f8, COM6 = 0x4f8, COM7 = 0x5e8, COM8 = 0x4e8, }; #endif FILE *uart_init(unsigned short port);