hazel/include/kernel/serial.h

22 lines
404 B
C

#ifndef HAZEL_SERIAL_H_
#define HAZEL_SERIAL_H_
#include <stdint.h>
#define COM1 0x3F8
#define COM2 0x2F8
#define COM3 0x3E8
#define COM4 0x2E8
#define COM5 0x5F8
#define COM6 0x4F8
#define COM7 0x5E8
#define COM8 0x4E8
#define IS_TRANSMIT_EMPTY(x) (inb(x + 5) & 0x20)
uint8_t serial_port_init(int port);
void serial_putc(int port, const char c);
void serial_puts(int port, const char *str);
#endif