/* Simula un falso puerto de comunicaciones. */ #ifndef __SIMULATED_COM_PORT_H__ #define __SIMULATED_COM_PORT_H__ #define FAKE_COM_PORT_CONTROL_REG 0x100 #define FAKE_COM_PORT_DATA_REG 0x101 /* * Depending on the value of port: * * FAKE_COM_PORT_CONTROL_REG: the communication port is initialized * * Any other value: no effect */ extern void fake_com_port_outb(unsigned short port, char val); /* * Depending on the value of port: * * FAKE_COM_PORT_DATA_REG: Returns the last byte received * * FAKE_COM_PORT_CONTROL_REG: returns 0x01 when there is new data * available and 0x00 in other case * * Any other value: returns 0x00 */ extern char fake_com_port_inb(unsigned short port); #endif // __SIMULATED_COM_PORT_H__