root/include/asm-alpha/termios.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 #ifndef _ALPHA_TERMIOS_H
   2 #define _ALPHA_TERMIOS_H
   3 
   4 #include <linux/types.h>
   5 
   6 #include <asm/ioctl.h>
   7 
   8 struct sgttyb {
   9         char    sg_ispeed;
  10         char    sg_ospeed;
  11         char    sg_erase;
  12         char    sg_kill;
  13         short   sg_flags;
  14 };
  15 
  16 struct tchars {
  17         char    t_intrc;
  18         char    t_quitc;
  19         char    t_startc;
  20         char    t_stopc;
  21         char    t_eofc;
  22         char    t_brkc;
  23 };
  24 
  25 struct ltchars {
  26         char    t_suspc;
  27         char    t_dsuspc;
  28         char    t_rprntc;
  29         char    t_flushc;
  30         char    t_werasc;
  31         char    t_lnextc;
  32 };
  33 
  34 #define FIOCLEX         _IO('f', 1)
  35 #define FIONCLEX        _IO('f', 2)
  36 #define FIOASYNC        _IOW('f', 125, int)
  37 #define FIONBIO         _IOW('f', 126, int)
  38 #define FIONREAD        _IOR('f', 127, int)
  39 #define TIOCINQ         FIONREAD
  40 
  41 #define TIOCGETP        _IOR('t', 8, struct sgttyb)
  42 #define TIOCSETP        _IOW('t', 9, struct sgttyb)
  43 #define TIOCSETN        _IOW('t', 10, struct sgttyb)    /* TIOCSETP wo flush */
  44 
  45 #define TIOCSETC        _IOW('t', 17, struct tchars)
  46 #define TIOCGETC        _IOR('t', 18, struct tchars)
  47 #define TCGETS          _IOR('t', 19, struct termios)
  48 #define TCSETS          _IOW('t', 20, struct termios)
  49 #define TCSETSW         _IOW('t', 21, struct termios)
  50 #define TCSETSF         _IOW('t', 22, struct termios)
  51 
  52 #define TCGETA          _IOR('t', 23, struct termio)
  53 #define TCSETA          _IOW('t', 24, struct termio)
  54 #define TCSETAW         _IOW('t', 25, struct termio)
  55 #define TCSETAF         _IOW('t', 28, struct termio)
  56 
  57 #define TCSBRK          _IO('t', 29)
  58 #define TCXONC          _IO('t', 30)
  59 #define TCFLSH          _IO('t', 31)
  60 
  61 #define TIOCSWINSZ      _IOW('t', 103, struct winsize)
  62 #define TIOCGWINSZ      _IOR('t', 104, struct winsize)
  63 
  64 #define TIOCGLTC        _IOR('t', 116, struct ltchars)
  65 #define TIOCSLTC        _IOW('t', 117, struct ltchars)
  66 #define TIOCSPGRP       _IOW('t', 118, int)
  67 #define TIOCGPGRP       _IOR('t', 119, int)
  68 
  69 #define TIOCEXCL        0x540C
  70 #define TIOCNXCL        0x540D
  71 #define TIOCSCTTY       0x540E
  72 
  73 #define TIOCOUTQ        0x5411
  74 #define TIOCSTI         0x5412
  75 #define TIOCMGET        0x5415
  76 #define TIOCMBIS        0x5416
  77 #define TIOCMBIC        0x5417
  78 #define TIOCMSET        0x5418
  79 #define TIOCGSOFTCAR    0x5419
  80 #define TIOCSSOFTCAR    0x541A
  81 #define TIOCLINUX       0x541C
  82 #define TIOCCONS        0x541D
  83 #define TIOCGSERIAL     0x541E
  84 #define TIOCSSERIAL     0x541F
  85 #define TIOCPKT         0x5420
  86 
  87 #define TIOCNOTTY       0x5422
  88 #define TIOCSETD        0x5423
  89 #define TIOCGETD        0x5424
  90 #define TCSBRKP         0x5425  /* Needed for POSIX tcsendbreak() */
  91 #define TIOCTTYGSTRUCT  0x5426  /* For debugging only */
  92 
  93 #define TIOCSERCONFIG   0x5453
  94 #define TIOCSERGWILD    0x5454
  95 #define TIOCSERSWILD    0x5455
  96 #define TIOCGLCKTRMIOS  0x5456
  97 #define TIOCSLCKTRMIOS  0x5457
  98 #define TIOCSERGSTRUCT  0x5458 /* For debugging only */
  99 #define TIOCSERGETLSR   0x5459 /* Get line status register */
 100 #define TIOCSERGETMULTI 0x545A /* Get multiport config  */
 101 #define TIOCSERSETMULTI 0x545B /* Set multiport config */
 102 
 103 /* Used for packet mode */
 104 #define TIOCPKT_DATA             0
 105 #define TIOCPKT_FLUSHREAD        1
 106 #define TIOCPKT_FLUSHWRITE       2
 107 #define TIOCPKT_STOP             4
 108 #define TIOCPKT_START            8
 109 #define TIOCPKT_NOSTOP          16
 110 #define TIOCPKT_DOSTOP          32
 111 
 112 struct winsize {
 113         unsigned short ws_row;
 114         unsigned short ws_col;
 115         unsigned short ws_xpixel;
 116         unsigned short ws_ypixel;
 117 };
 118 
 119 #define NCC 8
 120 struct termio {
 121         unsigned short c_iflag;         /* input mode flags */
 122         unsigned short c_oflag;         /* output mode flags */
 123         unsigned short c_cflag;         /* control mode flags */
 124         unsigned short c_lflag;         /* local mode flags */
 125         unsigned char c_line;           /* line discipline */
 126         unsigned char c_cc[NCC];        /* control characters */
 127 };
 128 
 129 #define NCCS 19
 130 struct termios {
 131         tcflag_t c_iflag;               /* input mode flags */
 132         tcflag_t c_oflag;               /* output mode flags */
 133         tcflag_t c_cflag;               /* control mode flags */
 134         tcflag_t c_lflag;               /* local mode flags */
 135         cc_t c_cc[NCCS];                /* control characters */
 136         cc_t c_line;                    /* line discipline (== c_cc[19]) */
 137         int c_ispeed;                   /* input speed */
 138         int c_ospeed;                   /* output speed */
 139 };
 140 
 141 /* c_cc characters */
 142 #define VEOF 0
 143 #define VEOL 1
 144 #define VEOL2 2
 145 #define VERASE 3
 146 #define VWERASE 4
 147 #define VKILL 5
 148 #define VREPRINT 6
 149 #define VSWTC 7
 150 #define VINTR 8
 151 #define VQUIT 9
 152 #define VSUSP 10
 153 #define VSTART 12
 154 #define VSTOP 13
 155 #define VLNEXT 14
 156 #define VDISCARD 15
 157 #define VTIME 17
 158 #define VMIN 16
 159 
 160 /*
 161  * ..and the same for c_cc in the termio structure.. 
 162  * Oh, how I love being backwardly compatible.
 163  */
 164 #define _VINTR  0
 165 #define _VQUIT  1
 166 #define _VERASE 2
 167 #define _VKILL  3
 168 #define _VEOF   4
 169 #define _VMIN   4
 170 #define _VEOL   5
 171 #define _VTIME  5
 172 #define _VEOL2  6
 173 #define _VSWTC  7
 174 
 175 #ifdef __KERNEL__
 176 /*      intr=^C         quit=^|         erase=del       kill=^U
 177         eof=^D          vtime=\0        vmin=\1         sxtc=\0
 178         start=^Q        stop=^S         susp=^Z         eol=\0
 179         reprint=^R      discard=^U      werase=^W       lnext=^V
 180         eol2=\0
 181 */
 182 #define INIT_C_CC "\004\000\000\177\027\025\022\000\003\034\032\000\021\023\026\025\000\001"
 183 #endif
 184 
 185 /* c_iflag bits */
 186 #define IGNBRK  0000001
 187 #define BRKINT  0000002
 188 #define IGNPAR  0000004
 189 #define PARMRK  0000010
 190 #define INPCK   0000020
 191 #define ISTRIP  0000040
 192 #define INLCR   0000100
 193 #define IGNCR   0000200
 194 #define ICRNL   0000400
 195 #define IXON    0001000
 196 #define IXOFF   0002000
 197 #define IXANY   0004000
 198 #define IUCLC   0010000
 199 #define IMAXBEL 0020000
 200 
 201 /* c_oflag bits */
 202 #define OPOST   0000001
 203 #define ONLCR   0000002
 204 #define OLCUC   0000004
 205 
 206 #define OCRNL   0000010
 207 #define ONOCR   0000020
 208 #define ONLRET  0000040
 209 
 210 #define OFILL   00000100
 211 #define OFDEL   00000200
 212 #define NLDLY   00001400
 213 #define   NL0   00000000
 214 #define   NL1   00000400
 215 #define   NL2   00001000
 216 #define   NL3   00001400
 217 #define TABDLY  00006000
 218 #define   TAB0  00000000
 219 #define   TAB1  00002000
 220 #define   TAB2  00004000
 221 #define   TAB3  00006000
 222 #define CRDLY   00030000
 223 #define   CR0   00000000
 224 #define   CR1   00010000
 225 #define   CR2   00020000
 226 #define   CR3   00030000
 227 #define FFDLY   00040000
 228 #define   FF0   00000000
 229 #define   FF1   00040000
 230 #define BSDLY   00100000
 231 #define   BS0   00000000
 232 #define   BS1   00100000
 233 #define VTDLY   00200000
 234 #define   VT0   00000000
 235 #define   VT1   00200000
 236 #define XTABS   01000000 /* Hmm.. Linux/i386 considers this part of TABDLY.. */
 237 
 238 /* c_cflag bit meaning */
 239 #define CBAUD   0000377
 240 #define  B0     0000000         /* hang up */
 241 #define  B50    0000001
 242 #define  B75    0000002
 243 #define  B110   0000003
 244 #define  B134   0000004
 245 #define  B150   0000005
 246 #define  B200   0000006
 247 #define  B300   0000007
 248 #define  B600   0000010
 249 #define  B1200  0000011
 250 #define  B1800  0000012
 251 #define  B2400  0000013
 252 #define  B4800  0000014
 253 #define  B9600  0000015
 254 #define  B19200 0000016
 255 #define  B38400 0000017
 256 #define EXTA B19200
 257 #define EXTB B38400
 258 #define CBAUDEX 0000020
 259 #define  B57600   00020
 260 #define  B115200  00021
 261 #define  B230400  00022
 262 
 263 #define CSIZE   00001400
 264 #define   CS5   00000000
 265 #define   CS6   00000400
 266 #define   CS7   00001000
 267 #define   CS8   00001400
 268 
 269 #define CSTOPB  00002000
 270 #define CREAD   00004000
 271 #define PARENB  00010000
 272 #define PARODD  00020000
 273 #define HUPCL   00040000
 274 
 275 #define CLOCAL  00100000
 276 #define CRTSCTS   020000000000          /* flow control */
 277 
 278 /* c_lflag bits */
 279 #define ISIG    0x00000080
 280 #define ICANON  0x00000100
 281 #define XCASE   0x00004000
 282 #define ECHO    0x00000008
 283 #define ECHOE   0x00000002
 284 #define ECHOK   0x00000004
 285 #define ECHONL  0x00000010
 286 #define NOFLSH  0x80000000
 287 #define TOSTOP  0x00400000
 288 #define ECHOCTL 0x00000040
 289 #define ECHOPRT 0x00000020
 290 #define ECHOKE  0x00000001
 291 #define FLUSHO  0x00800000
 292 #define PENDIN  0x20000000
 293 #define IEXTEN  0x00000400
 294 
 295 /* modem lines */
 296 #define TIOCM_LE        0x001
 297 #define TIOCM_DTR       0x002
 298 #define TIOCM_RTS       0x004
 299 #define TIOCM_ST        0x008
 300 #define TIOCM_SR        0x010
 301 #define TIOCM_CTS       0x020
 302 #define TIOCM_CAR       0x040
 303 #define TIOCM_RNG       0x080
 304 #define TIOCM_DSR       0x100
 305 #define TIOCM_CD        TIOCM_CAR
 306 #define TIOCM_RI        TIOCM_RNG
 307 
 308 /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
 309 #define TIOCSER_TEMT    0x01    /* Transmitter physically empty */
 310 
 311 
 312 /* tcflow() and TCXONC use these */
 313 #define TCOOFF          0
 314 #define TCOON           1
 315 #define TCIOFF          2
 316 #define TCION           3
 317 
 318 /* tcflush() and TCFLSH use these */
 319 #define TCIFLUSH        0
 320 #define TCOFLUSH        1
 321 #define TCIOFLUSH       2
 322 
 323 /* tcsetattr uses these */
 324 #define TCSANOW         0
 325 #define TCSADRAIN       1
 326 #define TCSAFLUSH       2
 327 
 328 /* line disciplines */
 329 #define N_TTY           0
 330 #define N_SLIP          1
 331 #define N_MOUSE         2
 332 #define N_PPP           3
 333 
 334 #endif

/* [previous][next][first][last][top][bottom][index][help] */