提交 094eed6c 编写于 作者: B bellard

two stop bits support


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2148 c046a42c-6fe2-441c-8c8c-71466251a162
上级 9b94dc32
...@@ -1598,7 +1598,7 @@ static void tty_serial_init(int fd, int speed, ...@@ -1598,7 +1598,7 @@ static void tty_serial_init(int fd, int speed,
|INLCR|IGNCR|ICRNL|IXON); |INLCR|IGNCR|ICRNL|IXON);
tty.c_oflag |= OPOST; tty.c_oflag |= OPOST;
tty.c_lflag &= ~(ECHO|ECHONL|ICANON|IEXTEN|ISIG); tty.c_lflag &= ~(ECHO|ECHONL|ICANON|IEXTEN|ISIG);
tty.c_cflag &= ~(CSIZE|PARENB|PARODD|CRTSCTS); tty.c_cflag &= ~(CSIZE|PARENB|PARODD|CRTSCTS|CSTOPB);
switch(data_bits) { switch(data_bits) {
default: default:
case 8: case 8:
...@@ -1625,6 +1625,8 @@ static void tty_serial_init(int fd, int speed, ...@@ -1625,6 +1625,8 @@ static void tty_serial_init(int fd, int speed,
tty.c_cflag |= PARENB | PARODD; tty.c_cflag |= PARENB | PARODD;
break; break;
} }
if (stop_bits == 2)
tty.c_cflag |= CSTOPB;
tcsetattr (fd, TCSANOW, &tty); tcsetattr (fd, TCSANOW, &tty);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册