1 #ifndef _SPARC_TERMBITS_H
2 #define _SPARC_TERMBITS_H
3
4 #include <linux/posix_types.h>
5
6 typedef unsigned char cc_t;
7 typedef unsigned int speed_t;
8 typedef unsigned long tcflag_t;
9
10 #define NCC 8
11 struct termio {
12 unsigned short c_iflag;
13 unsigned short c_oflag;
14 unsigned short c_cflag;
15 unsigned short c_lflag;
16 unsigned char c_line;
17 unsigned char c_cc[NCC];
18 };
19
20 #define NCCS 17
21 struct termios {
22 tcflag_t c_iflag;
23 tcflag_t c_oflag;
24 tcflag_t c_cflag;
25 tcflag_t c_lflag;
26 cc_t c_line;
27 cc_t c_cc[NCCS];
28 };
29
30
31 #define VINTR 0
32 #define VQUIT 1
33 #define VERASE 2
34 #define VKILL 3
35 #define VEOF 4
36 #define VEOL 5
37 #define VEOL2 6
38 #define VSWTC 7
39 #define VSTART 8
40 #define VSTOP 9
41 #define VSUSP 10
42 #define VDSUSP 11
43 #define VREPRINT 12
44 #define VDISCARD 13
45 #define VWERASE 14
46 #define VLNEXT 15
47 #define VMIN VEOF
48 #define VTIME VEOL
49
50
51 #define IGNBRK 0x00000001
52 #define BRKINT 0x00000002
53 #define IGNPAR 0x00000004
54 #define PARMRK 0x00000008
55 #define INPCK 0x00000010
56 #define ISTRIP 0x00000020
57 #define INLCR 0x00000040
58 #define IGNCR 0x00000080
59 #define ICRNL 0x00000100
60 #define IUCLC 0x00000200
61 #define IXON 0x00000400
62 #define IXANY 0x00000800
63 #define IXOFF 0x00001000
64 #define IMAXBEL 0x00002000
65
66
67 #define OPOST 0x00000001
68 #define OLCUC 0x00000002
69 #define ONLCR 0x00000004
70 #define OCRNL 0x00000008
71 #define ONOCR 0x00000010
72 #define ONLRET 0x00000020
73 #define OFILL 0x00000040
74 #define OFDEL 0x00000080
75 #define NLDLY 0x00000100
76 #define NL0 0x00000000
77 #define NL1 0x00000100
78 #define CRDLY 0x00000600
79 #define CR0 0x00000000
80 #define CR1 0x00000200
81 #define CR2 0x00000400
82 #define CR3 0x00000600
83 #define TABDLY 0x00001800
84 #define TAB0 0x00000000
85 #define TAB1 0x00000800
86 #define TAB2 0x00001000
87 #define TAB3 0x00001800
88 #define XTABS 0x00001800
89 #define BSDLY 0x00002000
90 #define BS0 0x00000000
91 #define BS1 0x00002000
92 #define VTDLY 0x00004000
93 #define VT0 0x00000000
94 #define VT1 0x00004000
95 #define FFDLY 0x00008000
96 #define FF0 0x00000000
97 #define FF1 0x00008000
98 #define PAGEOUT 0x00010000
99 #define WRAP 0x00020000
100
101
102 #define CBAUD 0x0000000f
103 #define B0 0x00000000
104 #define B50 0x00000001
105 #define B75 0x00000002
106 #define B110 0x00000003
107 #define B134 0x00000004
108 #define B150 0x00000005
109 #define B200 0x00000006
110 #define B300 0x00000007
111 #define B600 0x00000008
112 #define B1200 0x00000009
113 #define B1800 0x0000000a
114 #define B2400 0x0000000b
115 #define B4800 0x0000000c
116 #define B9600 0x0000000d
117 #define B19200 0x0000000e
118 #define B38400 0x0000000f
119 #define EXTA B19200
120 #define EXTB B38400
121 #define CSIZE 0x00000030
122 #define CS5 0x00000000
123 #define CS6 0x00000010
124 #define CS7 0x00000020
125 #define CS8 0x00000030
126 #define CSTOPB 0x00000040
127 #define CREAD 0x00000080
128 #define PARENB 0x00000100
129 #define PARODD 0x00000200
130 #define HUPCL 0x00000400
131 #define CLOCAL 0x00000800
132
133 #define CBAUDEX 0x00010000
134 #define B57600 0x00010001
135 #define B115200 0x00010002
136 #define B230400 0x00010003
137 #define CIBAUD 0x000f0000
138 #define CRTSCTS 0x80000000
139
140
141 #define ISIG 0x00000001
142 #define ICANON 0x00000002
143 #define XCASE 0x00000004
144 #define ECHO 0x00000008
145 #define ECHOE 0x00000010
146 #define ECHOK 0x00000020
147 #define ECHONL 0x00000040
148 #define NOFLSH 0x00000080
149 #define TOSTOP 0x00000100
150 #define ECHOCTL 0x00000200
151 #define ECHOPRT 0x00000400
152 #define ECHOKE 0x00000800
153 #define DEFECHO 0x00001000
154 #define FLUSHO 0x00002000
155 #define PENDIN 0x00004000
156 #define IEXTEN 0x00008000
157
158
159 #define TIOCM_LE 0x001
160 #define TIOCM_DTR 0x002
161 #define TIOCM_RTS 0x004
162 #define TIOCM_ST 0x008
163 #define TIOCM_SR 0x010
164 #define TIOCM_CTS 0x020
165 #define TIOCM_CAR 0x040
166 #define TIOCM_RNG 0x080
167 #define TIOCM_DSR 0x100
168 #define TIOCM_CD TIOCM_CAR
169 #define TIOCM_RI TIOCM_RNG
170
171
172 #define TIOCSER_TEMT 0x01
173
174
175
176 #define TCOOFF 0
177 #define TCOON 1
178 #define TCIOFF 2
179 #define TCION 3
180
181
182 #define TCIFLUSH 0
183 #define TCOFLUSH 1
184 #define TCIOFLUSH 2
185
186
187 #define TCSANOW 0
188 #define TCSADRAIN 1
189 #define TCSAFLUSH 2
190
191 #endif