Diffstat (limited to 'noncore/apps/opie-console/io_serial.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/io_serial.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/noncore/apps/opie-console/io_serial.h b/noncore/apps/opie-console/io_serial.h index 1d34411..521dac6 100644 --- a/noncore/apps/opie-console/io_serial.h +++ b/noncore/apps/opie-console/io_serial.h | |||
@@ -8,56 +8,56 @@ | |||
8 | #define SERIAL_DEFAULT_DEVICE "/dev/ttyS0" | 8 | #define SERIAL_DEFAULT_DEVICE "/dev/ttyS0" |
9 | #define SERIAL_DEFAULT_BAUD 9600 | 9 | #define SERIAL_DEFAULT_BAUD 9600 |
10 | #define SERIAL_DEFAULT_PARITY 0 | 10 | #define SERIAL_DEFAULT_PARITY 0 |
11 | #define SERIAL_DEFAULT_DBITS 8 | 11 | #define SERIAL_DEFAULT_DBITS 8 |
12 | #define SERIAL_DEFAULT_SBITS 1 | 12 | #define SERIAL_DEFAULT_SBITS 1 |
13 | #define SERIAL_DEFAULT_FLOW 0 | 13 | #define SERIAL_DEFAULT_FLOW 0 |
14 | 14 | ||
15 | /* IOSerial implements a RS232 IO Layer */ | 15 | /* IOSerial implements a RS232 IO Layer */ |
16 | 16 | ||
17 | class IOSerial : public IOLayer { | 17 | class IOSerial : public IOLayer { |
18 | Q_OBJECT | 18 | Q_OBJECT |
19 | public: | 19 | public: |
20 | enum Parity { | 20 | enum Parity { |
21 | ParityNone = 0, | 21 | ParityNone = 0, |
22 | ParityEven, | 22 | ParityEven, |
23 | ParityOdd, | 23 | ParityOdd, |
24 | ParitySpace, | 24 | ParitySpace, |
25 | ParityMark | 25 | ParityMark |
26 | }; | 26 | }; |
27 | 27 | ||
28 | enum Flow { | 28 | enum Flow { |
29 | FlowHW = 0x01, | 29 | FlowHW = 0x01, |
30 | FlowSW = 0x02 | 30 | FlowSW = 0x02 |
31 | }; | 31 | }; |
32 | 32 | ||
33 | IOSerial(const Config &); | 33 | IOSerial(const Profile &); |
34 | ~IOSerial(); | 34 | ~IOSerial(); |
35 | 35 | ||
36 | QString identifier() const; | 36 | QString identifier() const; |
37 | QString name() const; | 37 | QString name() const; |
38 | signals: | 38 | signals: |
39 | void received(const QByteArray &); | 39 | void received(const QByteArray &); |
40 | void error(int, const QString &); | 40 | void error(int, const QString &); |
41 | public slots: | 41 | public slots: |
42 | void send(const QByteArray &); | 42 | void send(const QByteArray &); |
43 | bool open(); | 43 | bool open(); |
44 | void close(); | 44 | void close(); |
45 | void reload(const Config &); | 45 | void reload(const Profile &); |
46 | protected: | 46 | protected: |
47 | int getBaud(int baud) const; | 47 | int baud(int baud) const; |
48 | protected slots: | 48 | protected slots: |
49 | void dataArrived(); | 49 | void dataArrived(); |
50 | void errorOccured(); | 50 | void errorOccured(); |
51 | protected: | 51 | protected: |
52 | QSocketNotifier *m_read; | 52 | QSocketNotifier *m_read; |
53 | QSocketNotifier *m_error; | 53 | QSocketNotifier *m_error; |
54 | QString m_device; | 54 | QString m_device; |
55 | int m_baud; | 55 | int m_baud; |
56 | int m_parity; | 56 | int m_parity; |
57 | int m_dbits; | 57 | int m_dbits; |
58 | int m_sbits; | 58 | int m_sbits; |
59 | int m_flow; | 59 | int m_flow; |
60 | int m_fd; | 60 | int m_fd; |
61 | }; | 61 | }; |
62 | 62 | ||
63 | #endif /* OPIE_IO_SERIAL */ | 63 | #endif /* OPIE_IO_SERIAL */ |