1 #ifndef _SPARC64_TERMBITS_H
2 #define _SPARC64_TERMBITS_H
4 #include <linux/posix_types.h>
6 typedef unsigned char cc_t;
7 typedef unsigned int speed_t;
9 /* XXX is this right for sparc64? it was an unsigned long... XXX */
10 typedef unsigned int tcflag_t;
14 unsigned short c_iflag; /* input mode flags */
15 unsigned short c_oflag; /* output mode flags */
16 unsigned short c_cflag; /* control mode flags */
17 unsigned short c_lflag; /* local mode flags */
18 unsigned char c_line; /* line discipline */
19 unsigned char c_cc[NCC]; /* control characters */
24 tcflag_t c_iflag; /* input mode flags */
25 tcflag_t c_oflag; /* output mode flags */
26 tcflag_t c_cflag; /* control mode flags */
27 tcflag_t c_lflag; /* local mode flags */
28 cc_t c_line; /* line discipline */
29 cc_t c_cc[NCCS]; /* control characters */
31 #define SIZEOF_USER_TERMIOS sizeof (struct termios) - (2*sizeof (cc_t))
32 cc_t _x_cc[2]; /* We need them to hold vmin/vtime */
37 tcflag_t c_iflag; /* input mode flags */
38 tcflag_t c_oflag; /* output mode flags */
39 tcflag_t c_cflag; /* control mode flags */
40 tcflag_t c_lflag; /* local mode flags */
41 cc_t c_line; /* line discipline */
42 cc_t c_cc[NCCS]; /* control characters */
43 cc_t _x_cc[2]; /* We need them to hold vmin/vtime */
44 speed_t c_ispeed; /* input speed */
45 speed_t c_ospeed; /* output speed */
63 #define VDSUSP 11 /* SunOS POSIX nicety I do believe... */
69 /* Kernel keeps vmin/vtime separated, user apps assume vmin/vtime is
81 #define IGNBRK 0x00000001
82 #define BRKINT 0x00000002
83 #define IGNPAR 0x00000004
84 #define PARMRK 0x00000008
85 #define INPCK 0x00000010
86 #define ISTRIP 0x00000020
87 #define INLCR 0x00000040
88 #define IGNCR 0x00000080
89 #define ICRNL 0x00000100
90 #define IUCLC 0x00000200
91 #define IXON 0x00000400
92 #define IXANY 0x00000800
93 #define IXOFF 0x00001000
94 #define IMAXBEL 0x00002000
95 #define IUTF8 0x00004000
98 #define OPOST 0x00000001
99 #define OLCUC 0x00000002
100 #define ONLCR 0x00000004
101 #define OCRNL 0x00000008
102 #define ONOCR 0x00000010
103 #define ONLRET 0x00000020
104 #define OFILL 0x00000040
105 #define OFDEL 0x00000080
106 #define NLDLY 0x00000100
107 #define NL0 0x00000000
108 #define NL1 0x00000100
109 #define CRDLY 0x00000600
110 #define CR0 0x00000000
111 #define CR1 0x00000200
112 #define CR2 0x00000400
113 #define CR3 0x00000600
114 #define TABDLY 0x00001800
115 #define TAB0 0x00000000
116 #define TAB1 0x00000800
117 #define TAB2 0x00001000
118 #define TAB3 0x00001800
119 #define XTABS 0x00001800
120 #define BSDLY 0x00002000
121 #define BS0 0x00000000
122 #define BS1 0x00002000
123 #define VTDLY 0x00004000
124 #define VT0 0x00000000
125 #define VT1 0x00004000
126 #define FFDLY 0x00008000
127 #define FF0 0x00000000
128 #define FF1 0x00008000
129 #define PAGEOUT 0x00010000 /* SUNOS specific */
130 #define WRAP 0x00020000 /* SUNOS specific */
132 /* c_cflag bit meaning */
133 #define CBAUD 0x0000100f
134 #define B0 0x00000000 /* hang up */
135 #define B50 0x00000001
136 #define B75 0x00000002
137 #define B110 0x00000003
138 #define B134 0x00000004
139 #define B150 0x00000005
140 #define B200 0x00000006
141 #define B300 0x00000007
142 #define B600 0x00000008
143 #define B1200 0x00000009
144 #define B1800 0x0000000a
145 #define B2400 0x0000000b
146 #define B4800 0x0000000c
147 #define B9600 0x0000000d
148 #define B19200 0x0000000e
149 #define B38400 0x0000000f
152 #define CSIZE 0x00000030
153 #define CS5 0x00000000
154 #define CS6 0x00000010
155 #define CS7 0x00000020
156 #define CS8 0x00000030
157 #define CSTOPB 0x00000040
158 #define CREAD 0x00000080
159 #define PARENB 0x00000100
160 #define PARODD 0x00000200
161 #define HUPCL 0x00000400
162 #define CLOCAL 0x00000800
163 #define CBAUDEX 0x00001000
164 #define B57600 0x00001001
165 #define B115200 0x00001002
166 #define B230400 0x00001003
167 #define B460800 0x00001004
168 /* This is what we can do with the Zilogs. */
169 #define B76800 0x00001005
170 /* This is what we can do with the SAB82532. */
171 #define B153600 0x00001006
172 #define B307200 0x00001007
173 #define B614400 0x00001008
174 #define B921600 0x00001009
175 /* And these are the rest... */
176 #define B500000 0x0000100a
177 #define B576000 0x0000100b
178 #define B1000000 0x0000100c
179 #define B1152000 0x0000100d
180 #define B1500000 0x0000100e
181 #define B2000000 0x0000100f
182 /* These have totally bogus values and nobody uses them
183 so far. Later on we'd have to use say 0x10000x and
184 adjust CBAUD constant and drivers accordingly.
185 #define B2500000 0x00001010
186 #define B3000000 0x00001011
187 #define B3500000 0x00001012
188 #define B4000000 0x00001013 */
189 #define CIBAUD 0x100f0000 /* input baud rate (not used) */
190 #define CMSPAR 0x40000000 /* mark or space (stick) parity */
191 #define CRTSCTS 0x80000000 /* flow control */
194 #define ISIG 0x00000001
195 #define ICANON 0x00000002
196 #define XCASE 0x00000004
197 #define ECHO 0x00000008
198 #define ECHOE 0x00000010
199 #define ECHOK 0x00000020
200 #define ECHONL 0x00000040
201 #define NOFLSH 0x00000080
202 #define TOSTOP 0x00000100
203 #define ECHOCTL 0x00000200
204 #define ECHOPRT 0x00000400
205 #define ECHOKE 0x00000800
206 #define DEFECHO 0x00001000 /* SUNOS thing, what is it? */
207 #define FLUSHO 0x00002000
208 #define PENDIN 0x00004000
209 #define IEXTEN 0x00008000
212 #define TIOCM_LE 0x001
213 #define TIOCM_DTR 0x002
214 #define TIOCM_RTS 0x004
215 #define TIOCM_ST 0x008
216 #define TIOCM_SR 0x010
217 #define TIOCM_CTS 0x020
218 #define TIOCM_CAR 0x040
219 #define TIOCM_RNG 0x080
220 #define TIOCM_DSR 0x100
221 #define TIOCM_CD TIOCM_CAR
222 #define TIOCM_RI TIOCM_RNG
223 #define TIOCM_OUT1 0x2000
224 #define TIOCM_OUT2 0x4000
225 #define TIOCM_LOOP 0x8000
227 /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
228 #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
231 /* tcflow() and TCXONC use these */
237 /* tcflush() and TCFLSH use these */
242 /* tcsetattr uses these */
247 #endif /* !(_SPARC64_TERMBITS_H) */