/** serial_configure_modem: * Configures the modem control register. * We want RTS and DTS to be 1 which means we are * Ready to send data. */ void serial_configure_modem(unsigned short com){ /* * Bit: | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | * Content: | r | r | af | lb | ao2 | ao1 | rts | dtr | * Value: | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | = 0x03 */ outb(SERIAL_MODEM_COMMAND_PORT(com), 0x0B); }
/** * Configure the modem with rts/dtr set */ void serial_configure_modem(unsigned short com, unsigned char config) { outb(SERIAL_MODEM_COMMAND_PORT(com), config); }
void serial_configure_modem(uint16_t com){ outb(SERIAL_MODEM_COMMAND_PORT(com), 0x03); }