diff options
Diffstat (limited to 'arch/x86_64/hal/serial_com.c')
| -rw-r--r-- | arch/x86_64/hal/serial_com.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/x86_64/hal/serial_com.c b/arch/x86_64/hal/serial_com.c index c571057..ec39d21 100644 --- a/arch/x86_64/hal/serial_com.c +++ b/arch/x86_64/hal/serial_com.c @@ -10,26 +10,26 @@ serial_com_recv(uint16_t port) return inb(SERIAL_COM_LSR(port)) & 1; } -static char -serial_com_getc(uint16_t port) -{ - while(serial_com_recv(port) == 0); - return inb(port); -} - static int serial_com_put_ready(uint16_t port) { return inb(SERIAL_COM_LSR(port)) & 0x20; } -static void +void serial_com_putc(uint16_t port, char c) { while(serial_com_put_ready(port) == 0); outb(port, c); } +char +serial_com_getc(uint16_t port) +{ + while(serial_com_recv(port) == 0); + return inb(port); +} + int serial_com_init_port( uint16_t port, |
