sparc64: add basic support
[uclibc-ng.git] / libc / sysdeps / linux / sparc64 / bits / termios.h
blobf4800d1b1e364f87b9fffbdd9993c2326d8544c0
1 /* termios type and macro definitions. Linux/SPARC version.
2 Copyright (C) 1993, 1994, 1995, 1996, 1997, 2000, 2005
3 Free Software Foundation, Inc.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
19 #ifndef _TERMIOS_H
20 # error "Never include <bits/termios.h> directly; use <termios.h> instead."
21 #endif
23 typedef unsigned char cc_t;
24 typedef unsigned int speed_t;
25 typedef unsigned int tcflag_t;
27 #define NCCS 17
28 struct termios
30 tcflag_t c_iflag; /* input mode flags */
31 tcflag_t c_oflag; /* output mode flags */
32 tcflag_t c_cflag; /* control mode flags */
33 tcflag_t c_lflag; /* local mode flags */
34 cc_t c_line; /* line discipline */
35 cc_t c_cc[NCCS]; /* control characters */
38 /* c_cc characters */
39 #define VINTR 0
40 #define VQUIT 1
41 #define VERASE 2
42 #define VKILL 3
43 #define VEOF 4
44 #define VEOL 5
45 #define VEOL2 6
46 #define VSWTC 7
47 #define VSTART 8
48 #define VSTOP 9
49 #define VSUSP 10
50 #define VDSUSP 11 /* SunOS POSIX nicety I do believe... */
51 #define VREPRINT 12
52 #define VDISCARD 13
53 #define VWERASE 14
54 #define VLNEXT 15
56 /* User apps assume vmin/vtime is shared with eof/eol */
57 #define VMIN VEOF
58 #define VTIME VEOL
60 /* c_iflag bits */
61 #define IGNBRK 0x00000001
62 #define BRKINT 0x00000002
63 #define IGNPAR 0x00000004
64 #define PARMRK 0x00000008
65 #define INPCK 0x00000010
66 #define ISTRIP 0x00000020
67 #define INLCR 0x00000040
68 #define IGNCR 0x00000080
69 #define ICRNL 0x00000100
70 #define IUCLC 0x00000200
71 #define IXON 0x00000400
72 #define IXANY 0x00000800
73 #define IXOFF 0x00001000
74 #define IMAXBEL 0x00002000
75 #define IUTF8 0x00004000
77 /* c_oflag bits */
78 #define OPOST 0x00000001
79 #define OLCUC 0x00000002
80 #define ONLCR 0x00000004
81 #define OCRNL 0x00000008
82 #define ONOCR 0x00000010
83 #define ONLRET 0x00000020
84 #define OFILL 0x00000040
85 #define OFDEL 0x00000080
86 #if defined __USE_MISC || defined __USE_XOPEN
87 # define NLDLY 0x00000100
88 # define NL0 0x00000000
89 # define NL1 0x00000100
90 # define CRDLY 0x00000600
91 # define CR0 0x00000000
92 # define CR1 0x00000200
93 # define CR2 0x00000400
94 # define CR3 0x00000600
95 # define TABDLY 0x00001800
96 # define TAB0 0x00000000
97 # define TAB1 0x00000800
98 # define TAB2 0x00001000
99 # define TAB3 0x00001800
100 # define BSDLY 0x00002000
101 # define BS0 0x00000000
102 # define BS1 0x00002000
103 #define FFDLY 0x00008000
104 #define FF0 0x00000000
105 #define FF1 0x00008000
106 #endif
107 #define VTDLY 0x00004000
108 #define VT0 0x00000000
109 #define VT1 0x00004000
110 #define PAGEOUT 0x00010000 /* SUNOS specific */
111 #define WRAP 0x00020000 /* SUNOS specific */
113 #ifdef __USE_MISC
114 # define XTABS 0x00001800
115 #endif
117 /* c_cflag bit meaning */
118 #ifdef __USE_MISC
119 # define CBAUD 0x0000100f
120 #endif
121 #define B0 0x00000000 /* hang up */
122 #define B50 0x00000001
123 #define B75 0x00000002
124 #define B110 0x00000003
125 #define B134 0x00000004
126 #define B150 0x00000005
127 #define B200 0x00000006
128 #define B300 0x00000007
129 #define B600 0x00000008
130 #define B1200 0x00000009
131 #define B1800 0x0000000a
132 #define B2400 0x0000000b
133 #define B4800 0x0000000c
134 #define B9600 0x0000000d
135 #define B19200 0x0000000e
136 #define B38400 0x0000000f
137 #ifdef __USE_MISC
138 # define EXTA B19200
139 # define EXTB B38400
140 #endif
141 #define CSIZE 0x00000030
142 #define CS5 0x00000000
143 #define CS6 0x00000010
144 #define CS7 0x00000020
145 #define CS8 0x00000030
146 #define CSTOPB 0x00000040
147 #define CREAD 0x00000080
148 #define PARENB 0x00000100
149 #define PARODD 0x00000200
150 #define HUPCL 0x00000400
151 #define CLOCAL 0x00000800
152 #ifdef __USE_MISC
153 # define CBAUDEX 0x00001000
154 #endif
155 #define B57600 0x00001001
156 #define B115200 0x00001002
157 #define B230400 0x00001003
158 #define B460800 0x00001004
159 #define B76800 0x00001005
160 #define B153600 0x00001006
161 #define B307200 0x00001007
162 #define B614400 0x00001008
163 #define B921600 0x00001009
164 #define B500000 0x0000100a
165 #define B576000 0x0000100b
166 #define B1000000 0x0000100c
167 #define B1152000 0x0000100d
168 #define B1500000 0x0000100e
169 #define B2000000 0x0000100f
170 #define __MAX_BAUD B2000000
172 #ifdef __USE_MISC
173 # define CIBAUD 0x100f0000 /* input baud rate (not used) */
174 # define CMSPAR 0x40000000 /* mark or space (stick) parity */
175 # define CRTSCTS 0x80000000 /* flow control */
176 #endif
178 /* c_lflag bits */
179 #define ISIG 0x00000001
180 #define ICANON 0x00000002
181 #if defined __USE_MISC || defined __USE_XOPEN
182 # define XCASE 0x00000004
183 #endif
184 #define ECHO 0x00000008
185 #define ECHOE 0x00000010
186 #define ECHOK 0x00000020
187 #define ECHONL 0x00000040
188 #define NOFLSH 0x00000080
189 #define TOSTOP 0x00000100
190 #ifdef __USE_MISC
191 # define ECHOCTL 0x00000200
192 # define ECHOPRT 0x00000400
193 # define ECHOKE 0x00000800
194 # define DEFECHO 0x00001000 /* SUNOS thing, what is it? */
195 # define FLUSHO 0x00002000
196 # define PENDIN 0x00004000
197 #endif
198 #define IEXTEN 0x00008000
200 /* modem lines */
201 #define TIOCM_LE 0x001
202 #define TIOCM_DTR 0x002
203 #define TIOCM_RTS 0x004
204 #define TIOCM_ST 0x008
205 #define TIOCM_SR 0x010
206 #define TIOCM_CTS 0x020
207 #define TIOCM_CAR 0x040
208 #define TIOCM_RNG 0x080
209 #define TIOCM_DSR 0x100
210 #define TIOCM_CD TIOCM_CAR
211 #define TIOCM_RI TIOCM_RNG
213 /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
214 #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
217 /* tcflow() and TCXONC use these */
218 #define TCOOFF 0
219 #define TCOON 1
220 #define TCIOFF 2
221 #define TCION 3
223 /* tcflush() and TCFLSH use these */
224 #define TCIFLUSH 0
225 #define TCOFLUSH 1
226 #define TCIOFLUSH 2
228 /* tcsetattr uses these */
229 #define TCSANOW 0
230 #define TCSADRAIN 1
231 #define TCSAFLUSH 2