~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Linux/include/asm-mips/termbits.h

Version: ~ [ 2.4.0 ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * termbits stuff for Linux/MIPS.
  3  *
  4  * This file is subject to the terms and conditions of the GNU General Public
  5  * License.  See the file "COPYING" in the main directory of this archive
  6  * for more details.
  7  *
  8  * Copyright (C) 1995, 1996 by Ralf Baechle
  9  */
 10 #ifndef __ASM_MIPS_TERMBITS_H
 11 #define __ASM_MIPS_TERMBITS_H
 12 
 13 #include <linux/posix_types.h>
 14 
 15 typedef unsigned char cc_t;
 16 typedef unsigned long speed_t;
 17 typedef unsigned long tcflag_t;
 18 
 19 /*
 20  * The ABI says nothing about NCC but seems to use NCCS as
 21  * replacement for it in struct termio
 22  */
 23 #define NCCS    23
 24 struct 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         /*
 30          * Seems nonexistent in the ABI, but Linux assumes existence ...
 31          */
 32         cc_t c_line;                    /* line discipline */
 33         cc_t c_cc[NCCS];                /* control characters */
 34 };
 35 
 36 /* c_cc characters */
 37 #define VINTR            0              /* Interrupt character [ISIG].  */
 38 #define VQUIT            1              /* Quit character [ISIG].  */
 39 #define VERASE           2              /* Erase character [ICANON].  */
 40 #define VKILL            3              /* Kill-line character [ICANON].  */
 41 #define VMIN             4              /* Minimum number of bytes read at once [!ICANON].  */
 42 #define VTIME            5              /* Time-out value (tenths of a second) [!ICANON].  */
 43 #define VEOL2            6              /* Second EOL character [ICANON].  */
 44 #define VSWTC            7              /* ??? */
 45 #define VSWTCH          VSWTC
 46 #define VSTART           8              /* Start (X-ON) character [IXON, IXOFF].  */
 47 #define VSTOP            9              /* Stop (X-OFF) character [IXON, IXOFF].  */
 48 #define VSUSP           10              /* Suspend character [ISIG].  */
 49 #if 0
 50 /*
 51  * VDSUSP is not supported
 52  */
 53 #define VDSUSP          11              /* Delayed suspend character [ISIG].  */
 54 #endif
 55 #define VREPRINT        12              /* Reprint-line character [ICANON].  */
 56 #define VDISCARD        13              /* Discard character [IEXTEN].  */
 57 #define VWERASE         14              /* Word-erase character [ICANON].  */
 58 #define VLNEXT          15              /* Literal-next character [IEXTEN].  */
 59 #define VEOF            16              /* End-of-file character [ICANON].  */
 60 #define VEOL            17              /* End-of-line character [ICANON].  */
 61 
 62 /* c_iflag bits */
 63 #define IGNBRK  0000001         /* Ignore break condition.  */
 64 #define BRKINT  0000002         /* Signal interrupt on break.  */
 65 #define IGNPAR  0000004         /* Ignore characters with parity errors.  */
 66 #define PARMRK  0000010         /* Mark parity and framing errors.  */
 67 #define INPCK   0000020         /* Enable input parity check.  */
 68 #define ISTRIP  0000040         /* Strip 8th bit off characters.  */
 69 #define INLCR   0000100         /* Map NL to CR on input.  */
 70 #define IGNCR   0000200         /* Ignore CR.  */
 71 #define ICRNL   0000400         /* Map CR to NL on input.  */
 72 #if defined (__USE_BSD) || defined (__KERNEL__)
 73 #define IUCLC   0001000         /* Map upper case to lower case on input.  */
 74 #endif
 75 #define IXON    0002000         /* Enable start/stop output control.  */
 76 #if defined (__USE_BSD) || defined (__KERNEL__)
 77 #define IXANY   0004000         /* Any character will restart after stop.  */
 78 #endif
 79 #define IXOFF   0010000         /* Enable start/stop input control.  */
 80 #if defined (__USE_BSD) || defined (__KERNEL__)
 81 #define IMAXBEL 0020000         /* Ring bell when input queue is full.  */
 82 #endif
 83 
 84 /* c_oflag bits */
 85 #define OPOST   0000001         /* Perform output processing.  */
 86 #if defined (__USE_BSD) || defined (__KERNEL__)
 87 #define OLCUC   0000002         /* Map lower case to upper case on output.  */
 88 #define ONLCR   0000004         /* Map NL to CR-NL on output.  */
 89 #define OCRNL   0000010
 90 #define ONOCR   0000020
 91 #define ONLRET  0000040
 92 #define OFILL   0000100
 93 #define OFDEL   0000200
 94 #define NLDLY   0000400
 95 #define   NL0   0000000
 96 #define   NL1   0000400
 97 #define CRDLY   0003000
 98 #define   CR0   0000000
 99 #define   CR1   0001000
100 #define   CR2   0002000
101 #define   CR3   0003000
102 #define TABDLY  0014000
103 #define   TAB0  0000000
104 #define   TAB1  0004000
105 #define   TAB2  0010000
106 #define   TAB3  0014000
107 #define   XTABS 0014000
108 #define BSDLY   0020000
109 #define   BS0   0000000
110 #define   BS1   0020000
111 #define VTDLY   0040000
112 #define   VT0   0000000
113 #define   VT1   0040000
114 #define FFDLY   0100000
115 #define   FF0   0000000
116 #define   FF1   0100000
117 /*
118 #define PAGEOUT ???
119 #define WRAP    ???
120  */
121 #endif
122 
123 /* c_cflag bit meaning */
124 #define CBAUD   0010017
125 #define  B0     0000000         /* hang up */
126 #define  B50    0000001
127 #define  B75    0000002
128 #define  B110   0000003
129 #define  B134   0000004
130 #define  B150   0000005
131 #define  B200   0000006
132 #define  B300   0000007
133 #define  B600   0000010
134 #define  B1200  0000011
135 #define  B1800  0000012
136 #define  B2400  0000013
137 #define  B4800  0000014
138 #define  B9600  0000015
139 #define  B19200 0000016
140 #define  B38400 0000017
141 #define EXTA B19200
142 #define EXTB B38400
143 #define CSIZE   0000060         /* Number of bits per byte (mask).  */
144 #define   CS5   0000000         /* 5 bits per byte.  */
145 #define   CS6   0000020         /* 6 bits per byte.  */
146 #define   CS7   0000040         /* 7 bits per byte.  */
147 #define   CS8   0000060         /* 8 bits per byte.  */
148 #define CSTOPB  0000100         /* Two stop bits instead of one.  */
149 #define CREAD   0000200         /* Enable receiver.  */
150 #define PARENB  0000400         /* Parity enable.  */
151 #define PARODD  0001000         /* Odd parity instead of even.  */
152 #define HUPCL   0002000         /* Hang up on last close.  */
153 #define CLOCAL  0004000         /* Ignore modem status lines.  */
154 #if defined (__USE_BSD) || defined (__KERNEL__)
155 #define CBAUDEX 0010000
156 #define    B57600 0010001
157 #define   B115200 0010002
158 #define   B230400 0010003
159 #define   B460800 0010004
160 #define   B500000 0010005
161 #define   B576000 0010006
162 #define   B921600 0010007
163 #define  B1000000 0010010
164 #define  B1152000 0010011
165 #define  B1500000 0010012
166 #define  B2000000 0010013
167 #define  B2500000 0010014
168 #define  B3000000 0010015
169 #define  B3500000 0010016
170 #define  B4000000 0010017
171 #define CIBAUD    002003600000  /* input baud rate (not used) */
172 #define CMSPAR    010000000000  /* mark or space (stick) parity */
173 #define CRTSCTS   020000000000          /* flow control */
174 #endif
175 
176 /* c_lflag bits */
177 #define ISIG    0000001         /* Enable signals.  */
178 #define ICANON  0000002         /* Do erase and kill processing.  */
179 #define XCASE   0000004
180 #define ECHO    0000010         /* Enable echo.  */
181 #define ECHOE   0000020         /* Visual erase for ERASE.  */
182 #define ECHOK   0000040         /* Echo NL after KILL.  */
183 #define ECHONL  0000100         /* Echo NL even if ECHO is off.  */
184 #define NOFLSH  0000200         /* Disable flush after interrupt.  */
185 #define IEXTEN  0000400         /* Enable DISCARD and LNEXT.  */
186 #if defined (__USE_BSD) || defined (__KERNEL__)
187 #define ECHOCTL 0001000         /* Echo control characters as ^X.  */
188 #define ECHOPRT 0002000         /* Hardcopy visual erase.  */
189 #define ECHOKE  0004000         /* Visual erase for KILL.  */
190 #endif
191 #define FLUSHO  0020000
192 #if defined (__USE_BSD) || defined (__KERNEL__)
193 #define PENDIN  0040000         /* Retype pending input (state).  */
194 #endif
195 #define TOSTOP  0100000         /* Send SIGTTOU for background output.  */
196 #define ITOSTOP TOSTOP
197 
198 /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
199 #define TIOCSER_TEMT    0x01    /* Transmitter physically empty */
200 
201 /* tcflow() and TCXONC use these */
202 #define TCOOFF          0       /* Suspend output.  */
203 #define TCOON           1       /* Restart suspended output.  */
204 #define TCIOFF          2       /* Send a STOP character.  */
205 #define TCION           3       /* Send a START character.  */
206 
207 /* tcflush() and TCFLSH use these */
208 #define TCIFLUSH        0       /* Discard data received but not yet read.  */
209 #define TCOFLUSH        1       /* Discard data written but not yet sent.  */
210 #define TCIOFLUSH       2       /* Discard all pending data.  */
211 
212 /* tcsetattr uses these */
213 #define TCSANOW         TCSETS  /* Change immediately.  */
214 #define TCSADRAIN       TCSETSW /* Change when pending output is written.  */
215 #define TCSAFLUSH       TCSETSF /* Flush pending input before changing.  */
216 
217 #endif /* __ASM_MIPS_TERMBITS_H */
218 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.