summaryrefslogtreecommitdiff
path: root/src/serialport/qserialport_p.h
diff options
context:
space:
mode:
authorDenis Shienkov <denis.shienkov@gmail.com>2015-09-05 12:43:05 +0300
committerDenis Shienkov <denis.shienkov@gmail.com>2015-09-07 13:06:40 +0000
commit3abd3ed07d2b30ecb2f8b9772ed5b3811bb9194b (patch)
tree48b84bfa7f3cebf5707e58a94d2b8f03773d7fd7 /src/serialport/qserialport_p.h
parent45bf94455c065b64dec65f354e62999b1c16cc7e (diff)
downloadqtserialport-3abd3ed07d2b30ecb2f8b9772ed5b3811bb9194b.tar.gz
Refactor the speed configuration for *nix
The internal implementation of this is a little tangled. It is reasonable to simplify it: 1. Remove the setBaudRate_helper() method, as it is equivalent to setStandardBaudRate() method. 2. Now the setStandardBaudRate() and the setCustomBaudRate() are self-sufficient methods (can setup a speed and an error codes internally) and return a boolean values. Also added the "loopback" test for check of different speeds. Tested with the on-board and the USB serial ports. Change-Id: I4320c2e29ad42a394e07753cbaea804d0faf6b78 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Diffstat (limited to 'src/serialport/qserialport_p.h')
-rw-r--r--src/serialport/qserialport_p.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/serialport/qserialport_p.h b/src/serialport/qserialport_p.h
index 070a316..cf8cb79 100644
--- a/src/serialport/qserialport_p.h
+++ b/src/serialport/qserialport_p.h
@@ -249,12 +249,8 @@ public:
bool initialize(QIODevice::OpenMode mode);
bool updateTermios();
- QSerialPortErrorInfo setBaudRate_helper(qint32 baudRate,
- QSerialPort::Directions directions);
- QSerialPortErrorInfo setCustomBaudRate(qint32 baudRate,
- QSerialPort::Directions directions);
- QSerialPortErrorInfo setStandardBaudRate(qint32 baudRate,
- QSerialPort::Directions directions);
+ bool setCustomBaudRate(qint32 baudRate, QSerialPort::Directions directions);
+ bool setStandardBaudRate(qint32 baudRate, QSerialPort::Directions directions);
bool isReadNotificationEnabled() const;
void setReadNotificationEnabled(bool enable);