1 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
24 #ifndef _SYS_SERIAL_H_
25 #define _SYS_SERIAL_H_
33 #define KNotifyBreakInt 0x01
34 #define KNotifyCD 0x02
35 #define KNotifyCTS 0x04
36 #define KNotifyDataAvailable 0x08
37 #define KNotifyDSR 0x10
38 #define KNotifyFramingError 0x20
39 #define KNotifyOutputEmpty 0x40
40 #define KNotifyOverrunError 0x80
41 #define KNotifyParityError 0x100
42 #define KNotifyRI 0x200
45 enums, #defines and struct for serial port settings
47 enum DataBits {DBits5,DBits6,DBits7,DBits8};
49 enum StopBits {Stop1,Stop2};
51 enum Parity {ParityNone,ParityEven,ParityOdd,ParityMark,ParitySpace};
55 Bps50,Bps75,Bps110,Bps134,Bps150,Bps300,Bps600,Bps1200,
56 Bps1800,Bps2000,Bps2400,Bps3600,Bps4800,Bps7200,Bps9600,
57 Bps19200,Bps38400,Bps57600,Bps115200,Bps230400,Bps460800,
58 Bps576000,Bps1152000,Bps4000000,
62 enum Fifo {FifoEnable,FifoDisable};
64 enum Sir {SIREnable,SIRDisable};
66 #define ConfigMaxTerminators 4
68 #define ConfigObeyXoff 0x01
69 #define ConfigSendXoff 0x02
70 #define ConfigObeyCTS 0x04
71 #define ConfigFailCTS 0x08
72 #define ConfigObeyDSR 0x10
73 #define ConfigFailDSR 0x20
74 #define ConfigObeyDCD 0x40
75 #define ConfigFailDCD 0x80
76 #define ConfigFreeRTS 0x100
77 #define ConfigFreeDTR 0x200
78 #define ConfigWriteBufferedComplete 0x80000000
80 #define ConfigParityErrorFail 0
81 #define ConfigParityErrorIgnore 0x01
82 #define ConfigParityErrorReplaceChar 0x02
83 #define ConfigXonXoffDebug 0x80000000
85 #define SignalCTS 0x01
86 #define SignalDSR 0x02
87 #define SignalDCD 0x04
88 #define SignalRNG 0x08
89 #define SignalRTS 0x10
90 #define SignalDTR 0x20
92 #define ConfigSIRPulseWidthMaximum 0x01
93 #define ConfigSIRPulseWidthMinimum 0x02
99 enum DataBits iDataBits;
100 enum StopBits iStopBits;
102 unsigned int iHandshake;
103 unsigned int iParityError;
106 int iTerminatorCount;
107 char iTerminator[ConfigMaxTerminators];
110 char iParityErrorChar;
112 unsigned int iSIRSettings;