/* Simula un falso puerto de comunicaciones. Utiliza el PIT para generar una interrupciĆ³n. Para que funcione correctamente MaRTE no debe utilizar la PIT, luego debe estar configurado para usar un PII. */ #ifndef __SIMULATED_COM_PORT_H__ #define __SIMULATED_COM_PORT_H__ // IO registers #define FAKE_COM_PORT_CONTROL_REG 0x100 #define FAKE_COM_PORT_DATA_REG 0x101 // Interrupt number generated by the communication port when a new data has // arrived #define FAKE_COM_PORT_IRQ TIMER_HWINTERRUPT /* * 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_intr_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_intr_inb(unsigned short port); #endif // __SIMULATED_COM_PORT_H__