blob: 057b9a3d8f83171114c39cd4dfdff2c02ef4e2f7 [file] [log] [blame]
Chris Zankel9a8fd552005-06-23 22:01:26 -07001/*
2 * include/asm-xtensa/termbits.h
3 *
4 * Copied from SH.
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 *
10 * Copyright (C) 2001 - 2005 Tensilica Inc.
11 */
12
13#ifndef _XTENSA_TERMBITS_H
14#define _XTENSA_TERMBITS_H
15
16
17#include <linux/posix_types.h>
18
19typedef unsigned char cc_t;
20typedef unsigned int speed_t;
21typedef unsigned int tcflag_t;
22
23#define NCCS 19
24struct termios {
25 tcflag_t c_iflag; /* input mode flags */
26 tcflag_t c_oflag; /* output mode flags */
27 tcflag_t c_cflag; /* control mode flags */
28 tcflag_t c_lflag; /* local mode flags */
29 cc_t c_line; /* line discipline */
30 cc_t c_cc[NCCS]; /* control characters */
31};
32
Chris Zankel1c0350b2006-12-13 00:34:32 -080033struct ktermios {
34 tcflag_t c_iflag; /* input mode flags */
35 tcflag_t c_oflag; /* output mode flags */
36 tcflag_t c_cflag; /* control mode flags */
37 tcflag_t c_lflag; /* local mode flags */
38 cc_t c_line; /* line discipline */
39 cc_t c_cc[NCCS]; /* control characters */
40 speed_t c_ispeed; /* input speed */
41 speed_t c_ospeed; /* output speed */
42};
43
Chris Zankel9a8fd552005-06-23 22:01:26 -070044/* c_cc characters */
45
46#define VINTR 0
47#define VQUIT 1
48#define VERASE 2
49#define VKILL 3
50#define VEOF 4
51#define VTIME 5
52#define VMIN 6
53#define VSWTC 7
54#define VSTART 8
55#define VSTOP 9
56#define VSUSP 10
57#define VEOL 11
58#define VREPRINT 12
59#define VDISCARD 13
60#define VWERASE 14
61#define VLNEXT 15
62#define VEOL2 16
63
64/* c_iflag bits */
65
66#define IGNBRK 0000001
67#define BRKINT 0000002
68#define IGNPAR 0000004
69#define PARMRK 0000010
70#define INPCK 0000020
71#define ISTRIP 0000040
72#define INLCR 0000100
73#define IGNCR 0000200
74#define ICRNL 0000400
75#define IUCLC 0001000
76#define IXON 0002000
77#define IXANY 0004000
78#define IXOFF 0010000
79#define IMAXBEL 0020000
80#define IUTF8 0040000
81
82/* c_oflag bits */
83
84#define OPOST 0000001
85#define OLCUC 0000002
86#define ONLCR 0000004
87#define OCRNL 0000010
88#define ONOCR 0000020
89#define ONLRET 0000040
90#define OFILL 0000100
91#define OFDEL 0000200
92#define NLDLY 0000400
93#define NL0 0000000
94#define NL1 0000400
95#define CRDLY 0003000
96#define CR0 0000000
97#define CR1 0001000
98#define CR2 0002000
99#define CR3 0003000
100#define TABDLY 0014000
101#define TAB0 0000000
102#define TAB1 0004000
103#define TAB2 0010000
104#define TAB3 0014000
105#define XTABS 0014000
106#define BSDLY 0020000
107#define BS0 0000000
108#define BS1 0020000
109#define VTDLY 0040000
110#define VT0 0000000
111#define VT1 0040000
112#define FFDLY 0100000
113#define FF0 0000000
114#define FF1 0100000
115
116/* c_cflag bit meaning */
117
118#define CBAUD 0010017
119#define B0 0000000 /* hang up */
120#define B50 0000001
121#define B75 0000002
122#define B110 0000003
123#define B134 0000004
124#define B150 0000005
125#define B200 0000006
126#define B300 0000007
127#define B600 0000010
128#define B1200 0000011
129#define B1800 0000012
130#define B2400 0000013
131#define B4800 0000014
132#define B9600 0000015
133#define B19200 0000016
134#define B38400 0000017
135#define EXTA B19200
136#define EXTB B38400
137#define CSIZE 0000060
138#define CS5 0000000
139#define CS6 0000020
140#define CS7 0000040
141#define CS8 0000060
142#define CSTOPB 0000100
143#define CREAD 0000200
144#define PARENB 0000400
145#define PARODD 0001000
146#define HUPCL 0002000
147#define CLOCAL 0004000
148#define CBAUDEX 0010000
149#define B57600 0010001
150#define B115200 0010002
151#define B230400 0010003
152#define B460800 0010004
153#define B500000 0010005
154#define B576000 0010006
155#define B921600 0010007
156#define B1000000 0010010
157#define B1152000 0010011
158#define B1500000 0010012
159#define B2000000 0010013
160#define B2500000 0010014
161#define B3000000 0010015
162#define B3500000 0010016
163#define B4000000 0010017
164#define CIBAUD 002003600000 /* input baud rate (not used) */
165#define CMSPAR 010000000000 /* mark or space (stick) parity */
166#define CRTSCTS 020000000000 /* flow control */
167
168/* c_lflag bits */
169
170#define ISIG 0000001
171#define ICANON 0000002
172#define XCASE 0000004
173#define ECHO 0000010
174#define ECHOE 0000020
175#define ECHOK 0000040
176#define ECHONL 0000100
177#define NOFLSH 0000200
178#define TOSTOP 0000400
179#define ECHOCTL 0001000
180#define ECHOPRT 0002000
181#define ECHOKE 0004000
182#define FLUSHO 0010000
183#define PENDIN 0040000
184#define IEXTEN 0100000
185
186/* tcflow() and TCXONC use these */
187
188#define TCOOFF 0
189#define TCOON 1
190#define TCIOFF 2
191#define TCION 3
192
193/* tcflush() and TCFLSH use these */
194
195#define TCIFLUSH 0
196#define TCOFLUSH 1
197#define TCIOFLUSH 2
198
199/* tcsetattr uses these */
200
201#define TCSANOW 0
202#define TCSADRAIN 1
203#define TCSAFLUSH 2
204
205#endif /* _XTENSA_TERMBITS_H */