示例#1
0
文件: serial.c 项目: itravers/PanicOS
/** 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);
}
示例#2
0
文件: serial.c 项目: kllk2320/os
/**
 * Configure the modem with rts/dtr set
 */
void serial_configure_modem(unsigned short com, unsigned char config)
{
    outb(SERIAL_MODEM_COMMAND_PORT(com), config);
}
示例#3
0
void serial_configure_modem(uint16_t com){
    outb(SERIAL_MODEM_COMMAND_PORT(com), 0x03);
}