#pragma once #define COM1 0x3F8 void serial_init(void); void serial_putchar(char ch); void serial_puts(char *str); char serial_get_byte(void); char serial_getchar(void); int serial_received(void); /* Mask the UART receive-data-available IRQ (IER bit 0). Used by the * breakpoint debugger so bytes typed while it polls serial_getchar() are * not silently consumed by serial_irq_handler() and pushed into the input * ring instead of being delivered to the debugger. */ void serial_disable_rx_irq(void); /* Re-arm the UART receive-data-available IRQ and drain anything that * accumulated in the RBR while the IRQ was masked. Mirror of * serial_disable_rx_irq(). */ void serial_enable_rx_irq(void);