OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [include/] [asm-sparc64/] [termbits.h] - Blame information for rev 1774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1276 phoenix
#ifndef _SPARC64_TERMBITS_H
2
#define _SPARC64_TERMBITS_H
3
 
4
#include <linux/posix_types.h>
5
 
6
typedef unsigned char   cc_t;
7
typedef unsigned int    speed_t;
8
 
9
/* XXX is this right for sparc64?  it was an unsigned long... XXX */
10
typedef unsigned int    tcflag_t;
11
 
12
#define NCC 8
13
struct termio {
14
        unsigned short c_iflag;         /* input mode flags */
15
        unsigned short c_oflag;         /* output mode flags */
16
        unsigned short c_cflag;         /* control mode flags */
17
        unsigned short c_lflag;         /* local mode flags */
18
        unsigned char c_line;           /* line discipline */
19
        unsigned char c_cc[NCC];        /* control characters */
20
};
21
 
22
#define NCCS 17
23
struct termios {
24
        tcflag_t c_iflag;               /* input mode flags */
25
        tcflag_t c_oflag;               /* output mode flags */
26
        tcflag_t c_cflag;               /* control mode flags */
27
        tcflag_t c_lflag;               /* local mode flags */
28
        cc_t c_line;                    /* line discipline */
29
        cc_t c_cc[NCCS];                /* control characters */
30
#ifdef __KERNEL__
31
#define SIZEOF_USER_TERMIOS sizeof (struct termios) - (2*sizeof (cc_t))
32
        cc_t _x_cc[2];                  /* We need them to hold vmin/vtime */
33
#endif
34
};
35
 
36
/* c_cc characters */
37
#define VINTR    0
38
#define VQUIT    1
39
#define VERASE   2
40
#define VKILL    3
41
#define VEOF     4
42
#define VEOL     5
43
#define VEOL2    6
44
#define VSWTC    7
45
#define VSTART   8
46
#define VSTOP    9
47
 
48
 
49
 
50
#define VSUSP    10
51
#define VDSUSP   11  /* SunOS POSIX nicety I do believe... */
52
#define VREPRINT 12
53
#define VDISCARD 13
54
#define VWERASE  14
55
#define VLNEXT   15
56
 
57
/* Kernel keeps vmin/vtime separated, user apps assume vmin/vtime is
58
 * shared with eof/eol
59
 */
60
#ifdef __KERNEL__
61
#define VMIN     16
62
#define VTIME    17
63
#else
64
#define VMIN     VEOF
65
#define VTIME    VEOL
66
#endif
67
 
68
/* c_iflag bits */
69
#define IGNBRK  0x00000001
70
#define BRKINT  0x00000002
71
#define IGNPAR  0x00000004
72
#define PARMRK  0x00000008
73
#define INPCK   0x00000010
74
#define ISTRIP  0x00000020
75
#define INLCR   0x00000040
76
#define IGNCR   0x00000080
77
#define ICRNL   0x00000100
78
#define IUCLC   0x00000200
79
#define IXON    0x00000400
80
#define IXANY   0x00000800
81
#define IXOFF   0x00001000
82
#define IMAXBEL 0x00002000
83
 
84
/* c_oflag bits */
85
#define OPOST   0x00000001
86
#define OLCUC   0x00000002
87
#define ONLCR   0x00000004
88
#define OCRNL   0x00000008
89
#define ONOCR   0x00000010
90
#define ONLRET  0x00000020
91
#define OFILL   0x00000040
92
#define OFDEL   0x00000080
93
#define NLDLY   0x00000100
94
#define   NL0   0x00000000
95
#define   NL1   0x00000100
96
#define CRDLY   0x00000600
97
#define   CR0   0x00000000
98
#define   CR1   0x00000200
99
#define   CR2   0x00000400
100
#define   CR3   0x00000600
101
#define TABDLY  0x00001800
102
#define   TAB0  0x00000000
103
#define   TAB1  0x00000800
104
#define   TAB2  0x00001000
105
#define   TAB3  0x00001800
106
#define   XTABS 0x00001800
107
#define BSDLY   0x00002000
108
#define   BS0   0x00000000
109
#define   BS1   0x00002000
110
#define VTDLY   0x00004000
111
#define   VT0   0x00000000
112
#define   VT1   0x00004000
113
#define FFDLY   0x00008000
114
#define   FF0   0x00000000
115
#define   FF1   0x00008000
116
#define PAGEOUT 0x00010000  /* SUNOS specific */
117
#define WRAP    0x00020000  /* SUNOS specific */
118
 
119
/* c_cflag bit meaning */
120
#define CBAUD     0x0000100f
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
#define EXTA      B19200
138
#define EXTB      B38400
139
#define  CSIZE    0x00000030
140
#define   CS5     0x00000000
141
#define   CS6     0x00000010
142
#define   CS7     0x00000020
143
#define   CS8     0x00000030
144
#define CSTOPB    0x00000040
145
#define CREAD     0x00000080
146
#define PARENB    0x00000100
147
#define PARODD    0x00000200
148
#define HUPCL     0x00000400
149
#define CLOCAL    0x00000800
150
#define CBAUDEX   0x00001000
151
#define  B57600   0x00001001
152
#define  B115200  0x00001002
153
#define  B230400  0x00001003
154
#define  B460800  0x00001004
155
/* This is what we can do with the Zilogs. */
156
#define  B76800   0x00001005
157
/* This is what we can do with the SAB82532. */
158
#define  B153600  0x00001006
159
#define  B307200  0x00001007
160
#define  B614400  0x00001008
161
#define  B921600  0x00001009
162
/* And these are the rest... */
163
#define  B500000  0x0000100a
164
#define  B576000  0x0000100b
165
#define B1000000  0x0000100c
166
#define B1152000  0x0000100d
167
#define B1500000  0x0000100e
168
#define B2000000  0x0000100f
169
/* These have totally bogus values and nobody uses them
170
   so far. Later on we'd have to use say 0x10000x and
171
   adjust CBAUD constant and drivers accordingly.
172
#define B2500000  0x00001010
173
#define B3000000  0x00001011
174
#define B3500000  0x00001012
175
#define B4000000  0x00001013  */
176
#define CIBAUD    0x100f0000  /* input baud rate (not used) */
177
#define CMSPAR    0x40000000  /* mark or space (stick) parity */
178
#define CRTSCTS   0x80000000  /* flow control */
179
 
180
/* c_lflag bits */
181
#define ISIG    0x00000001
182
#define ICANON  0x00000002
183
#define XCASE   0x00000004
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
#define ECHOCTL 0x00000200
191
#define ECHOPRT 0x00000400
192
#define ECHOKE  0x00000800
193
#define DEFECHO 0x00001000  /* SUNOS thing, what is it? */
194
#define FLUSHO  0x00002000
195
#define PENDIN  0x00004000
196
#define IEXTEN  0x00008000
197
 
198
/* modem lines */
199
#define TIOCM_LE        0x001
200
#define TIOCM_DTR       0x002
201
#define TIOCM_RTS       0x004
202
#define TIOCM_ST        0x008
203
#define TIOCM_SR        0x010
204
#define TIOCM_CTS       0x020
205
#define TIOCM_CAR       0x040
206
#define TIOCM_RNG       0x080
207
#define TIOCM_DSR       0x100
208
#define TIOCM_CD        TIOCM_CAR
209
#define TIOCM_RI        TIOCM_RNG
210
#define TIOCM_OUT1      0x2000
211
#define TIOCM_OUT2      0x4000
212
#define TIOCM_LOOP      0x8000
213
 
214
#define TIOCM_MODEM_BITS       TIOCM_OUT2      /* IRDA support */
215
 
216
/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
217
#define TIOCSER_TEMT    0x01    /* Transmitter physically empty */
218
 
219
 
220
/* tcflow() and TCXONC use these */
221
#define TCOOFF          0
222
#define TCOON           1
223
#define TCIOFF          2
224
#define TCION           3
225
 
226
/* tcflush() and TCFLSH use these */
227
#define TCIFLUSH        0
228
#define TCOFLUSH        1
229
#define TCIOFLUSH       2
230
 
231
/* tcsetattr uses these */
232
#define TCSANOW         0
233
#define TCSADRAIN       1
234
#define TCSAFLUSH       2
235
 
236
#endif /* !(_SPARC64_TERMBITS_H) */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.