summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/io_serial.cpp
Side-by-side diff
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 @@
-IOSerial::IOSerial(const Config &config) : IOLayer(config) {
+IOSerial::IOSerial(const Profile &config) : IOLayer(config) {
m_fd = 0;
@@ -48,3 +48,3 @@ bool IOSerial::open() {
/* Baud rate */
- int speed = getBaud(m_baud);
+ int speed = baud(m_baud);
if (speed == -1) {
@@ -59,3 +59,3 @@ bool IOSerial::open() {
}
-
+
/* Data bits */
@@ -66,4 +66,5 @@ bool IOSerial::open() {
case 8: tty.c_cflag = (tty.c_cflag & ~CSIZE) | CS8; break;
+ default: break;
}
-
+
/* Raw, no echo mode */
@@ -80,3 +81,3 @@ bool IOSerial::open() {
}
-
+
tty.c_cc[VMIN] = 1;
@@ -89,3 +90,3 @@ bool IOSerial::open() {
tty.c_iflag &= ~(IXON|IXOFF|IXANY);
-
+
if (m_flow & FlowHW)
@@ -94,3 +95,3 @@ bool IOSerial::open() {
tty.c_cflag &= ~CRTSCTS;
-
+
/* Parity */
@@ -101,3 +102,3 @@ bool IOSerial::open() {
tty.c_cflag |= (PARENB | PARODD);
-
+
/* Set the changes */
@@ -117,3 +118,3 @@ bool IOSerial::open() {
-void IOSerial::reload(const Config &config) {
+void IOSerial::reload(const Profile &config) {
m_device = config.readEntry("Device", SERIAL_DEFAULT_DEVICE);
@@ -126,3 +127,3 @@ void IOSerial::reload(const Config &config) {
-int IOSerial::getBaud(int baud) const {
+int IOSerial::baud(int baud) const {
switch (baud) {