File: /usr/src/linux/include/asm-cris/termbits.h
1 /* $Id: termbits.h,v 1.1 2000/07/10 16:32:31 bjornw Exp $ */
2
3 #ifndef __ARCH_ETRAX100_TERMBITS_H__
4 #define __ARCH_ETRAX100_TERMBITS_H__
5
6 #include <linux/posix_types.h>
7
8 typedef unsigned char cc_t;
9 typedef unsigned int speed_t;
10 typedef unsigned int tcflag_t;
11
12 #define NCCS 19
13 struct termios {
14 tcflag_t c_iflag; /* input mode flags */
15 tcflag_t c_oflag; /* output mode flags */
16 tcflag_t c_cflag; /* control mode flags */
17 tcflag_t c_lflag; /* local mode flags */
18 cc_t c_line; /* line discipline */
19 cc_t c_cc[NCCS]; /* control characters */
20 };
21
22 /* c_cc characters */
23 #define VINTR 0
24 #define VQUIT 1
25 #define VERASE 2
26 #define VKILL 3
27 #define VEOF 4
28 #define VTIME 5
29 #define VMIN 6
30 #define VSWTC 7
31 #define VSTART 8
32 #define VSTOP 9
33 #define VSUSP 10
34 #define VEOL 11
35 #define VREPRINT 12
36 #define VDISCARD 13
37 #define VWERASE 14
38 #define VLNEXT 15
39 #define VEOL2 16
40
41 /* c_iflag bits */
42 #define IGNBRK 0000001
43 #define BRKINT 0000002
44 #define IGNPAR 0000004
45 #define PARMRK 0000010
46 #define INPCK 0000020
47 #define ISTRIP 0000040
48 #define INLCR 0000100
49 #define IGNCR 0000200
50 #define ICRNL 0000400
51 #define IUCLC 0001000
52 #define IXON 0002000
53 #define IXANY 0004000
54 #define IXOFF 0010000
55 #define IMAXBEL 0020000
56
57 /* c_oflag bits */
58 #define OPOST 0000001
59 #define OLCUC 0000002
60 #define ONLCR 0000004
61 #define OCRNL 0000010
62 #define ONOCR 0000020
63 #define ONLRET 0000040
64 #define OFILL 0000100
65 #define OFDEL 0000200
66 #define NLDLY 0000400
67 #define NL0 0000000
68 #define NL1 0000400
69 #define CRDLY 0003000
70 #define CR0 0000000
71 #define CR1 0001000
72 #define CR2 0002000
73 #define CR3 0003000
74 #define TABDLY 0014000
75 #define TAB0 0000000
76 #define TAB1 0004000
77 #define TAB2 0010000
78 #define TAB3 0014000
79 #define XTABS 0014000
80 #define BSDLY 0020000
81 #define BS0 0000000
82 #define BS1 0020000
83 #define VTDLY 0040000
84 #define VT0 0000000
85 #define VT1 0040000
86 #define FFDLY 0100000
87 #define FF0 0000000
88 #define FF1 0100000
89
90 /* c_cflag bit meaning */
91 #define CBAUD 0010017
92 #define B0 0000000 /* hang up */
93 #define B50 0000001
94 #define B75 0000002
95 #define B110 0000003
96 #define B134 0000004
97 #define B150 0000005
98 #define B200 0000006
99 #define B300 0000007
100 #define B600 0000010
101 #define B1200 0000011
102 #define B1800 0000012
103 #define B2400 0000013
104 #define B4800 0000014
105 #define B9600 0000015
106 #define B19200 0000016
107 #define B38400 0000017
108 #define EXTA B19200
109 #define EXTB B38400
110 #define CSIZE 0000060
111 #define CS5 0000000
112 #define CS6 0000020
113 #define CS7 0000040
114 #define CS8 0000060
115 #define CSTOPB 0000100
116 #define CREAD 0000200
117 #define PARENB 0000400
118 #define PARODD 0001000
119 #define HUPCL 0002000
120 #define CLOCAL 0004000
121 #define CBAUDEX 0010000
122 #define B57600 0010001
123 #define B115200 0010002
124 #define B230400 0010003
125 #define B460800 0010004
126 /* etrax100 supports these additional three baud rates */
127 #define B921600 0010005
128 #define B1843200 0010006
129 #define B6250000 0010007
130 #define CIBAUD 002003600000 /* input baud rate (not used) */
131 #define CRTSCTS 020000000000 /* flow control */
132
133 /* c_lflag bits */
134 #define ISIG 0000001
135 #define ICANON 0000002
136 #define XCASE 0000004
137 #define ECHO 0000010
138 #define ECHOE 0000020
139 #define ECHOK 0000040
140 #define ECHONL 0000100
141 #define NOFLSH 0000200
142 #define TOSTOP 0000400
143 #define ECHOCTL 0001000
144 #define ECHOPRT 0002000
145 #define ECHOKE 0004000
146 #define FLUSHO 0010000
147 #define PENDIN 0040000
148 #define IEXTEN 0100000
149
150 /* tcflow() and TCXONC use these */
151 #define TCOOFF 0
152 #define TCOON 1
153 #define TCIOFF 2
154 #define TCION 3
155
156 /* tcflush() and TCFLSH use these */
157 #define TCIFLUSH 0
158 #define TCOFLUSH 1
159 #define TCIOFLUSH 2
160
161 /* tcsetattr uses these */
162 #define TCSANOW 0
163 #define TCSADRAIN 1
164 #define TCSAFLUSH 2
165
166 #endif
167