MOXA linux-2.6.x / linux-2.6.19-uc1 from UC-7110-LX-BOOTLOADER-1.9_VERSION-4.2.tgz
[linux-2.6.19-moxart.git] / include / asm-nios2nommu / termbits.h
blob2e89e5b7abfce71ffb9f6dd01a4316e8e3226481
1 #ifndef __ARCH_NIOS_TERMBITS_H__
2 #define __ARCH_NIOS_TERMBITS_H__
4 /*--------------------------------------------------------------------
6 * include/asm-nios2nommu/termbits.h
8 * Derived from various works, Alpha, ix86, M68K, Sparc, ...et al
10 * Copyright (C) 2004 Microtronix Datacom Ltd
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
23 * Jan/20/2004 dgt NiosII
25 ---------------------------------------------------------------------*/
28 #include <linux/posix_types.h>
30 typedef unsigned char cc_t;
31 typedef unsigned int speed_t;
32 typedef unsigned int tcflag_t;
34 #define NCCS 19
35 struct termios {
36 tcflag_t c_iflag; /* input mode flags */
37 tcflag_t c_oflag; /* output mode flags */
38 tcflag_t c_cflag; /* control mode flags */
39 tcflag_t c_lflag; /* local mode flags */
40 cc_t c_line; /* line discipline */
41 cc_t c_cc[NCCS]; /* control characters */
44 /* c_cc characters */
45 #define VINTR 0
46 #define VQUIT 1
47 #define VERASE 2
48 #define VKILL 3
49 #define VEOF 4
50 #define VTIME 5
51 #define VMIN 6
52 #define VSWTC 7
53 #define VSTART 8
54 #define VSTOP 9
55 #define VSUSP 10
56 #define VEOL 11
57 #define VREPRINT 12
58 #define VDISCARD 13
59 #define VWERASE 14
60 #define VLNEXT 15
61 #define VEOL2 16
64 /* c_iflag bits */
65 #define IGNBRK 0000001
66 #define BRKINT 0000002
67 #define IGNPAR 0000004
68 #define PARMRK 0000010
69 #define INPCK 0000020
70 #define ISTRIP 0000040
71 #define INLCR 0000100
72 #define IGNCR 0000200
73 #define ICRNL 0000400
74 #define IUCLC 0001000
75 #define IXON 0002000
76 #define IXANY 0004000
77 #define IXOFF 0010000
78 #define IMAXBEL 0020000
79 #define IUTF8 0040000
81 /* c_oflag bits */
82 #define OPOST 0000001
83 #define OLCUC 0000002
84 #define ONLCR 0000004
85 #define OCRNL 0000010
86 #define ONOCR 0000020
87 #define ONLRET 0000040
88 #define OFILL 0000100
89 #define OFDEL 0000200
90 #define NLDLY 0000400
91 #define NL0 0000000
92 #define NL1 0000400
93 #define CRDLY 0003000
94 #define CR0 0000000
95 #define CR1 0001000
96 #define CR2 0002000
97 #define CR3 0003000
98 #define TABDLY 0014000
99 #define TAB0 0000000
100 #define TAB1 0004000
101 #define TAB2 0010000
102 #define TAB3 0014000
103 #define XTABS 0014000
104 #define BSDLY 0020000
105 #define BS0 0000000
106 #define BS1 0020000
107 #define VTDLY 0040000
108 #define VT0 0000000
109 #define VT1 0040000
110 #define FFDLY 0100000
111 #define FF0 0000000
112 #define FF1 0100000
114 /* c_cflag bit meaning */
115 #define CBAUD 0010017
116 #define B0 0000000 /* hang up */
117 #define B50 0000001
118 #define B75 0000002
119 #define B110 0000003
120 #define B134 0000004
121 #define B150 0000005
122 #define B200 0000006
123 #define B300 0000007
124 #define B600 0000010
125 #define B1200 0000011
126 #define B1800 0000012
127 #define B2400 0000013
128 #define B4800 0000014
129 #define B9600 0000015
130 #define B19200 0000016
131 #define B38400 0000017
132 #define EXTA B19200
133 #define EXTB B38400
134 #define CSIZE 0000060
135 #define CS5 0000000
136 #define CS6 0000020
137 #define CS7 0000040
138 #define CS8 0000060
139 #define CSTOPB 0000100
140 #define CREAD 0000200
141 #define PARENB 0000400
142 #define PARODD 0001000
143 #define HUPCL 0002000
144 #define CLOCAL 0004000
145 #define CBAUDEX 0010000
146 #define B57600 0010001
147 #define B115200 0010002
148 #define B230400 0010003
149 #define B460800 0010004
150 #define B500000 0010005
151 #define B576000 0010006
152 #define B921600 0010007
153 #define B1000000 0010010
154 #define B1152000 0010011
155 #define B1500000 0010012
156 #define B2000000 0010013
157 #define B2500000 0010014
158 #define B3000000 0010015
159 #define B3500000 0010016
160 #define B4000000 0010017
161 #define CIBAUD 002003600000 /* input baud rate (not used) */
162 #define CMSPAR 010000000000 /* mark or space (stick) parity */
163 #define CRTSCTS 020000000000 /* flow control */
165 /* c_lflag bits */
166 #define ISIG 0000001
167 #define ICANON 0000002
168 #define XCASE 0000004
169 #define ECHO 0000010
170 #define ECHOE 0000020
171 #define ECHOK 0000040
172 #define ECHONL 0000100
173 #define NOFLSH 0000200
174 #define TOSTOP 0000400
175 #define ECHOCTL 0001000
176 #define ECHOPRT 0002000
177 #define ECHOKE 0004000
178 #define FLUSHO 0010000
179 #define PENDIN 0040000
180 #define IEXTEN 0100000
183 /* tcflow() and TCXONC use these */
184 #define TCOOFF 0
185 #define TCOON 1
186 #define TCIOFF 2
187 #define TCION 3
189 /* tcflush() and TCFLSH use these */
190 #define TCIFLUSH 0
191 #define TCOFLUSH 1
192 #define TCIOFLUSH 2
194 /* tcsetattr uses these */
195 #define TCSANOW 0
196 #define TCSADRAIN 1
197 #define TCSAFLUSH 2
199 #endif /* __ARCH_NIOS_TERMBITS_H__ */