hrev46579 adds 2 changesets to branch 'master' old head: 364da0f98665bb93d7dbc3595602816e88d28808 new head: d3e73d457e74feb381f5984f060595a2a60e835d overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=d3e73d4+%5E364da0f ---------------------------------------------------------------------------- 9cdbb95: Remove comment. d3e73d4: Use POSIX API to set serial port speed. POSIX says CBAUD is reserved, and provides an easier way to set the speed using a dedicated function. [ Adrien Destugues <pulkomandy@xxxxxxxxxxxxx> ] ---------------------------------------------------------------------------- 2 files changed, 3 insertions(+), 5 deletions(-) headers/posix/termios.h | 3 --- src/kits/device/SerialPort.cpp | 5 +++-- ############################################################################ Commit: 9cdbb954768f1a693bb725722a663104849567d4 URL: http://cgit.haiku-os.org/haiku/commit/?id=9cdbb95 Author: Adrien Destugues <pulkomandy@xxxxxxxxxxxxx> Date: Sat Dec 21 20:55:53 2013 UTC Remove comment. ---------------------------------------------------------------------------- diff --git a/headers/posix/termios.h b/headers/posix/termios.h index 451208a..b56c595 100644 --- a/headers/posix/termios.h +++ b/headers/posix/termios.h @@ -111,9 +111,6 @@ struct termios { #define B115200 0x11 #define B230400 0x12 #define B31250 0x13 /* for MIDI */ - // Yes, this last one is out of order. Don't change it, it would break ABI. - // If you change it anyway, make sure the constants in SerialPort.h are - // matching. #define CSIZE 0x20 /* character size */ #define CS5 0x00 /* only 7 and 8 bits supported */ ############################################################################ Revision: hrev46579 Commit: d3e73d457e74feb381f5984f060595a2a60e835d URL: http://cgit.haiku-os.org/haiku/commit/?id=d3e73d4 Author: Adrien Destugues <pulkomandy@xxxxxxxxxxxxx> Date: Sat Dec 21 20:59:31 2013 UTC Use POSIX API to set serial port speed. POSIX says CBAUD is reserved, and provides an easier way to set the speed using a dedicated function. ---------------------------------------------------------------------------- diff --git a/src/kits/device/SerialPort.cpp b/src/kits/device/SerialPort.cpp index 97c8874..a425556 100644 --- a/src/kits/device/SerialPort.cpp +++ b/src/kits/device/SerialPort.cpp @@ -562,7 +562,7 @@ BSerialPort::_DriverControl() // Reset all flags options.c_iflag &= ~(IXON | IXOFF | IXANY | INPCK); - options.c_cflag &= ~(CRTSCTS | CSIZE | CBAUD | CSTOPB | PARODD | PARENB); + options.c_cflag &= ~(CRTSCTS | CSIZE | CSTOPB | PARODD | PARENB); options.c_lflag &= ~(ECHO | ECHONL | ISIG | ICANON); // Local line @@ -589,7 +589,8 @@ BSerialPort::_DriverControl() } //Set the baud rate - options.c_cflag |= (fBaudRate & CBAUD); + cfsetispeed(&options, fBaudRate); + cfsetospeed(&options, fBaudRate); //Set the timeout options.c_cc[VTIME] = 0;