#ifndef PORT_H #define PORT_H #include typedef enum port_type_t { PORT_TYPE_8BIT = 0, PORT_TYPE_8BIT_SLOW = 1, PORT_TYPE_16BIT = 2, PORT_TYPE_32BIT = 3 } port_type_t; typedef struct port_t { port_type_t type; uint16_t number; // port number, e.g. 0x3d4 VGA index register } port_t; void port_init( port_t *port, port_type_t type, uint16_t number ); void port_write8( port_t *port, uint8_t data ); uint8_t port_read8( port_t *port ); #endif //