1 /* Copyright (C) 1997, 1999, 2001 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public License as
6 published by the Free Software Foundation; either version 2 of the
7 License, or (at your option) any later version.
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public
15 License along with the GNU C Library; see the file COPYING.LIB. If not,
16 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 Boston, MA 02111-1307, USA. */
20 # error "Never include <bits/termios.h> directly; use <termios.h> instead."
23 typedef unsigned char cc_t
;
24 typedef unsigned int speed_t
;
25 typedef unsigned int tcflag_t
;
28 * termios type and macro definitions. Be careful about adding stuff
29 * to this file since it's used in GNU libc and there are strict rules
30 * concerning namespace pollution.
35 tcflag_t c_iflag
; /* input mode flags */
36 tcflag_t c_oflag
; /* output mode flags */
37 tcflag_t c_cflag
; /* control mode flags */
38 tcflag_t c_lflag
; /* local mode flags */
39 cc_t c_line
; /* line discipline (== c_cc[19]) */
40 cc_t c_cc
[NCCS
]; /* control characters */
41 speed_t c_ispeed
; /* input speed */
42 speed_t c_ospeed
; /* output speed */
66 #define IGNBRK 0000001
67 #define BRKINT 0000002
68 #define IGNPAR 0000004
69 #define PARMRK 0000010
71 #define ISTRIP 0000040
79 #define IMAXBEL 0020000
88 #define ONLRET 0000040
90 #define OFILL 00000100
91 #define OFDEL 00000200
92 #define NLDLY 00001400
97 #define TABDLY 00006000
100 #define TAB2 00004000
101 #define TAB3 00006000
102 #define CRDLY 00030000
107 #define FFDLY 00040000
110 #define BSDLY 00100000
113 #define VTDLY 00200000
116 #define XTABS 01000000 /* Hmm.. Linux/i386 considers this part of TABDLY.. */
118 /* c_cflag bit meaning */
119 #define CBAUD 0000377
120 #define B0 0000000 /* hang up */
129 #define B1200 0000011
130 #define B1800 0000012
131 #define B2400 0000013
132 #define B4800 0000014
133 #define B9600 0000015
134 #define B19200 0000016
135 #define B38400 0000017
138 #define CBAUDEX 0000020
140 #define B115200 00021
141 #define B230400 00022
142 #define B460800 00023
143 #define B500000 00024
144 #define B576000 00025
145 #define B921600 00026
146 #define B1000000 00027
147 #define B1152000 00030
148 #define B1500000 00031
149 #define B2000000 00032
150 #define B2500000 00033
151 #define B3000000 00034
152 #define B3500000 00035
153 #define B4000000 00036
154 #define __MAX_BAUD B4000000
156 #define CSIZE 00001400
162 #define CSTOPB 00002000
163 #define CREAD 00004000
164 #define PARENB 00010000
165 #define PARODD 00020000
166 #define HUPCL 00040000
168 #define CLOCAL 00100000
169 #define CRTSCTS 020000000000 /* flow control */
172 #define ISIG 0x00000080
173 #define ICANON 0x00000100
174 #define XCASE 0x00004000
175 #define ECHO 0x00000008
176 #define ECHOE 0x00000002
177 #define ECHOK 0x00000004
178 #define ECHONL 0x00000010
179 #define NOFLSH 0x80000000
180 #define TOSTOP 0x00400000
181 #define ECHOCTL 0x00000040
182 #define ECHOPRT 0x00000020
183 #define ECHOKE 0x00000001
184 #define FLUSHO 0x00800000
185 #define PENDIN 0x20000000
186 #define IEXTEN 0x00000400
188 /* Values for the ACTION argument to `tcflow'. */
194 /* Values for the QUEUE_SELECTOR argument to `tcflush'. */
199 /* Values for the OPTIONAL_ACTIONS argument to `tcsetattr'. */
230 /* Used for packet mode */
231 #define TIOCPKT_DATA 0
232 #define TIOCPKT_FLUSHREAD 1
233 #define TIOCPKT_FLUSHWRITE 2
234 #define TIOCPKT_STOP 4
235 #define TIOCPKT_START 8
236 #define TIOCPKT_NOSTOP 16
237 #define TIOCPKT_DOSTOP 32
240 unsigned short ws_row
;
241 unsigned short ws_col
;
242 unsigned short ws_xpixel
;
243 unsigned short ws_ypixel
;
248 unsigned short c_iflag
; /* input mode flags */
249 unsigned short c_oflag
; /* output mode flags */
250 unsigned short c_cflag
; /* control mode flags */
251 unsigned short c_lflag
; /* local mode flags */
252 unsigned char c_line
; /* line discipline */
253 unsigned char c_cc
[NCC
]; /* control characters */
256 /* c_cc characters */
269 #define TIOCM_LE 0x001
270 #define TIOCM_DTR 0x002
271 #define TIOCM_RTS 0x004
272 #define TIOCM_ST 0x008
273 #define TIOCM_SR 0x010
274 #define TIOCM_CTS 0x020
275 #define TIOCM_CAR 0x040
276 #define TIOCM_RNG 0x080
277 #define TIOCM_DSR 0x100
278 #define TIOCM_CD TIOCM_CAR
279 #define TIOCM_RI TIOCM_RNG
281 /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
282 #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
284 /* line disciplines */
291 #define N_X25 6 /* X.25 async */
293 #define N_MASC 8 /* Mobitex module */
294 #define N_R3964 9 /* Simatic R3964 module */
295 #define N_PROFIBUS_FDL 10 /* Profibus */
296 #define N_IRDA 11 /* Linux IR */
297 #define N_SMSBLOCK 12 /* SMS block mode */
298 #define N_HDLC 13 /* synchronous HDLC */
299 #define N_SYNC_PPP 14 /* synchronous PPP */
300 #define N_HCI 15 /* Bluetooth HCI UART */