summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/io_serial.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-console/io_serial.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/io_serial.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/noncore/apps/opie-console/io_serial.cpp b/noncore/apps/opie-console/io_serial.cpp
index c9155d1..b495f39 100644
--- a/noncore/apps/opie-console/io_serial.cpp
+++ b/noncore/apps/opie-console/io_serial.cpp
@@ -6,3 +6,3 @@
6 6
7IOSerial::IOSerial(const Config &config) : IOLayer(config) { 7IOSerial::IOSerial(const Profile &config) : IOLayer(config) {
8 m_fd = 0; 8 m_fd = 0;
@@ -48,3 +48,3 @@ bool IOSerial::open() {
48 /* Baud rate */ 48 /* Baud rate */
49 int speed = getBaud(m_baud); 49 int speed = baud(m_baud);
50 if (speed == -1) { 50 if (speed == -1) {
@@ -59,3 +59,3 @@ bool IOSerial::open() {
59 } 59 }
60 60
61 /* Data bits */ 61 /* Data bits */
@@ -66,4 +66,5 @@ bool IOSerial::open() {
66 case 8: tty.c_cflag = (tty.c_cflag & ~CSIZE) | CS8; break; 66 case 8: tty.c_cflag = (tty.c_cflag & ~CSIZE) | CS8; break;
67 default: break;
67 } 68 }
68 69
69 /* Raw, no echo mode */ 70 /* Raw, no echo mode */
@@ -80,3 +81,3 @@ bool IOSerial::open() {
80 } 81 }
81 82
82 tty.c_cc[VMIN] = 1; 83 tty.c_cc[VMIN] = 1;
@@ -89,3 +90,3 @@ bool IOSerial::open() {
89 tty.c_iflag &= ~(IXON|IXOFF|IXANY); 90 tty.c_iflag &= ~(IXON|IXOFF|IXANY);
90 91
91 if (m_flow & FlowHW) 92 if (m_flow & FlowHW)
@@ -94,3 +95,3 @@ bool IOSerial::open() {
94 tty.c_cflag &= ~CRTSCTS; 95 tty.c_cflag &= ~CRTSCTS;
95 96
96 /* Parity */ 97 /* Parity */
@@ -101,3 +102,3 @@ bool IOSerial::open() {
101 tty.c_cflag |= (PARENB | PARODD); 102 tty.c_cflag |= (PARENB | PARODD);
102 103
103 /* Set the changes */ 104 /* Set the changes */
@@ -117,3 +118,3 @@ bool IOSerial::open() {
117 118
118void IOSerial::reload(const Config &config) { 119void IOSerial::reload(const Profile &config) {
119 m_device = config.readEntry("Device", SERIAL_DEFAULT_DEVICE); 120 m_device = config.readEntry("Device", SERIAL_DEFAULT_DEVICE);
@@ -126,3 +127,3 @@ void IOSerial::reload(const Config &config) {
126 127
127int IOSerial::getBaud(int baud) const { 128int IOSerial::baud(int baud) const {
128 switch (baud) { 129 switch (baud) {