Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrobotrovsky <robotrovsky@users.noreply.github.com>2017-10-27 20:59:13 +0300
committerAlexander Köplinger <alex.koeplinger@outlook.com>2017-10-27 20:59:13 +0300
commite1b75723d740520da10f209cd3e76c3e34113d77 (patch)
tree85de959942a5ec61b50b91b0fd3eef9479b69fd4 /support
parentf2e658cdcadf027a970fe0ebe9d5898caa76bd83 (diff)
Bugfix: 1.5 stop bits for serial port should set the posix stop bit flag (#5873)
1.5 stop bits have not been handled at all. According to this documentation of the 8250 UART: http://stanislavs.org/helppc/8250.html a set bit 2 in the LCR register means stop bits = 1.5 for 5 bit words or 2 for 6, 7 or 8 bit words. That is the reason why pyserial also sets the bit: https://github.com/pyserial/pyserial/blob/92d101613be41ecb2f2054c3f43a006fbe6f9966/serial/serialposix.py#L377
Diffstat (limited to 'support')
-rw-r--r--support/serial.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/support/serial.c b/support/serial.c
index 5e3d732c005..bbe71635537 100644
--- a/support/serial.c
+++ b/support/serial.c
@@ -334,7 +334,8 @@ set_attributes (int fd, int baud_rate, MonoParity parity, int dataBits, MonoStop
newtio.c_cflag |= CSTOPB;
break;
case OnePointFive: /* OnePointFive */
- /* XXX unhandled */
+ /* 8250 UART handles stop bit flag as 1.5 stop bits for 5 data bits */
+ newtio.c_cflag |= CSTOPB;
break;
}