1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#pragma once enum UART { COM1 = 0x3f8, COM2 = 0x2f8, COM3 = 0x3E8, COM4 = 0x2E8, COM5 = 0x5F8, COM6 = 0x4F8, COM7 = 0x5E8, COM8 = 0x4E8, }; int uart_init(enum UART port); void uart_write(enum UART port, char a); int uart_puts(enum UART port, const char *string, int length);