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

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [rc203soc/] [sw/] [uClinux/] [include/] [asm-sparc/] [termbits.h] - Blame information for rev 1782

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1633 jcastillo
#ifndef _SPARC_TERMBITS_H
2
#define _SPARC_TERMBITS_H
3
 
4
#include <linux/posix_types.h>
5
 
6
typedef unsigned char   cc_t;
7
typedef unsigned int    speed_t;
8
typedef unsigned long   tcflag_t;
9
 
10
#define NCC 8
11
struct termio {
12
        unsigned short c_iflag;         /* input mode flags */
13
        unsigned short c_oflag;         /* output mode flags */
14
        unsigned short c_cflag;         /* control mode flags */
15
        unsigned short c_lflag;         /* local mode flags */
16
        unsigned char c_line;           /* line discipline */
17
        unsigned char c_cc[NCC];        /* control characters */
18
};
19
 
20
#define NCCS 17
21
struct termios {
22
        tcflag_t c_iflag;               /* input mode flags */
23
        tcflag_t c_oflag;               /* output mode flags */
24
        tcflag_t c_cflag;               /* control mode flags */
25
        tcflag_t c_lflag;               /* local mode flags */
26
        cc_t c_line;                    /* line discipline */
27
        cc_t c_cc[NCCS];                /* control characters */
28
};
29
 
30
/* c_cc characters */
31
#define VINTR    0
32
#define VQUIT    1
33
#define VERASE   2
34
#define VKILL    3
35
#define VEOF     4
36
#define VEOL     5
37
#define VEOL2    6
38
#define VSWTC    7
39
#define VSTART   8
40
#define VSTOP    9
41
#define VSUSP    10
42
#define VDSUSP   11  /* SunOS POSIX nicety I do believe... */
43
#define VREPRINT 12
44
#define VDISCARD 13
45
#define VWERASE  14
46
#define VLNEXT   15
47
#define VMIN     VEOF
48
#define VTIME    VEOL
49
 
50
/* c_iflag bits */
51
#define IGNBRK  0x00000001
52
#define BRKINT  0x00000002
53
#define IGNPAR  0x00000004
54
#define PARMRK  0x00000008
55
#define INPCK   0x00000010
56
#define ISTRIP  0x00000020
57
#define INLCR   0x00000040
58
#define IGNCR   0x00000080
59
#define ICRNL   0x00000100
60
#define IUCLC   0x00000200
61
#define IXON    0x00000400
62
#define IXANY   0x00000800
63
#define IXOFF   0x00001000
64
#define IMAXBEL 0x00002000
65
 
66
/* c_oflag bits */
67
#define OPOST   0x00000001
68
#define OLCUC   0x00000002
69
#define ONLCR   0x00000004
70
#define OCRNL   0x00000008
71
#define ONOCR   0x00000010
72
#define ONLRET  0x00000020
73
#define OFILL   0x00000040
74
#define OFDEL   0x00000080
75
#define NLDLY   0x00000100
76
#define   NL0   0x00000000
77
#define   NL1   0x00000100
78
#define CRDLY   0x00000600
79
#define   CR0   0x00000000
80
#define   CR1   0x00000200
81
#define   CR2   0x00000400
82
#define   CR3   0x00000600
83
#define TABDLY  0x00001800
84
#define   TAB0  0x00000000
85
#define   TAB1  0x00000800
86
#define   TAB2  0x00001000
87
#define   TAB3  0x00001800
88
#define   XTABS 0x00001800
89
#define BSDLY   0x00002000
90
#define   BS0   0x00000000
91
#define   BS1   0x00002000
92
#define VTDLY   0x00004000
93
#define   VT0   0x00000000
94
#define   VT1   0x00004000
95
#define FFDLY   0x00008000
96
#define   FF0   0x00000000
97
#define   FF1   0x00008000
98
#define PAGEOUT 0x00010000  /* SUNOS specific */
99
#define WRAP    0x00020000  /* SUNOS specific */
100
 
101
/* c_cflag bit meaning */
102
#define CBAUD   0x0000000f
103
#define  B0     0x00000000   /* hang up */
104
#define  B50    0x00000001
105
#define  B75    0x00000002
106
#define  B110   0x00000003
107
#define  B134   0x00000004
108
#define  B150   0x00000005
109
#define  B200   0x00000006
110
#define  B300   0x00000007
111
#define  B600   0x00000008
112
#define  B1200  0x00000009
113
#define  B1800  0x0000000a
114
#define  B2400  0x0000000b
115
#define  B4800  0x0000000c
116
#define  B9600  0x0000000d
117
#define  B19200 0x0000000e
118
#define  B38400 0x0000000f
119
#define EXTA    B19200
120
#define EXTB    B38400
121
#define  CSIZE  0x00000030
122
#define   CS5   0x00000000
123
#define   CS6   0x00000010
124
#define   CS7   0x00000020
125
#define   CS8   0x00000030
126
#define CSTOPB  0x00000040
127
#define CREAD   0x00000080
128
#define PARENB  0x00000100
129
#define PARODD  0x00000200
130
#define HUPCL   0x00000400
131
#define CLOCAL  0x00000800
132
/* We'll never see these speeds with the Zilogs' but for completeness... */
133
#define CBAUDEX 0x00010000
134
#define  B57600  0x00010001
135
#define  B115200 0x00010002
136
#define  B230400 0x00010003
137
#define  B460800 0x00010004
138
#define CIBAUD    0x000f0000  /* input baud rate (not used) */
139
#define CRTSCTS   0x80000000  /* flow control */
140
 
141
/* c_lflag bits */
142
#define ISIG    0x00000001
143
#define ICANON  0x00000002
144
#define XCASE   0x00000004
145
#define ECHO    0x00000008
146
#define ECHOE   0x00000010
147
#define ECHOK   0x00000020
148
#define ECHONL  0x00000040
149
#define NOFLSH  0x00000080
150
#define TOSTOP  0x00000100
151
#define ECHOCTL 0x00000200
152
#define ECHOPRT 0x00000400
153
#define ECHOKE  0x00000800
154
#define DEFECHO 0x00001000  /* SUNOS thing, what is it? */
155
#define FLUSHO  0x00002000
156
#define PENDIN  0x00004000
157
#define IEXTEN  0x00008000
158
 
159
/* modem lines */
160
#define TIOCM_LE        0x001
161
#define TIOCM_DTR       0x002
162
#define TIOCM_RTS       0x004
163
#define TIOCM_ST        0x008
164
#define TIOCM_SR        0x010
165
#define TIOCM_CTS       0x020
166
#define TIOCM_CAR       0x040
167
#define TIOCM_RNG       0x080
168
#define TIOCM_DSR       0x100
169
#define TIOCM_CD        TIOCM_CAR
170
#define TIOCM_RI        TIOCM_RNG
171
 
172
/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
173
#define TIOCSER_TEMT    0x01    /* Transmitter physically empty */
174
 
175
 
176
/* tcflow() and TCXONC use these */
177
#define TCOOFF          0
178
#define TCOON           1
179
#define TCIOFF          2
180
#define TCION           3
181
 
182
/* tcflush() and TCFLSH use these */
183
#define TCIFLUSH        0
184
#define TCOFLUSH        1
185
#define TCIOFLUSH       2
186
 
187
/* tcsetattr uses these */
188
#define TCSANOW         0
189
#define TCSADRAIN       1
190
#define TCSAFLUSH       2
191
 
192
#endif /* !(_SPARC_TERMBITS_H) */

powered by: WebSVN 2.1.0

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