root/include/linux/termios.h

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

INCLUDED FROM


   1 #ifndef _LINUX_TERMIOS_H
   2 #define _LINUX_TERMIOS_H
   3 
   4 /* 0x54 is just a magic number to make these relatively uniqe ('T') */
   5 
   6 #define TCGETS          0x5401
   7 #define TCSETS          0x5402
   8 #define TCSETSW         0x5403
   9 #define TCSETSF         0x5404
  10 #define TCGETA          0x5405
  11 #define TCSETA          0x5406
  12 #define TCSETAW         0x5407
  13 #define TCSETAF         0x5408
  14 #define TCSBRK          0x5409
  15 #define TCXONC          0x540A
  16 #define TCFLSH          0x540B
  17 #define TIOCEXCL        0x540C
  18 #define TIOCNXCL        0x540D
  19 #define TIOCSCTTY       0x540E
  20 #define TIOCGPGRP       0x540F
  21 #define TIOCSPGRP       0x5410
  22 #define TIOCOUTQ        0x5411
  23 #define TIOCSTI         0x5412
  24 #define TIOCGWINSZ      0x5413
  25 #define TIOCSWINSZ      0x5414
  26 #define TIOCMGET        0x5415
  27 #define TIOCMBIS        0x5416
  28 #define TIOCMBIC        0x5417
  29 #define TIOCMSET        0x5418
  30 #define TIOCGSOFTCAR    0x5419
  31 #define TIOCSSOFTCAR    0x541A
  32 #define FIONREAD        0x541B
  33 #define TIOCINQ         FIONREAD
  34 #define TIOCLINUX       0x541C
  35 #define TIOCCONS        0x541D
  36 #define TIOCGSERIAL     0x541E
  37 #define TIOCSSERIAL     0x541F
  38 #define TIOCPKT         0x5420
  39 #define FIONBIO         0x5421
  40 #define TIOCNOTTY       0x5422
  41 #define TIOCSETD        0x5423
  42 #define TIOCGETD        0x5424
  43 #define TCSBRKP         0x5425  /* Needed for POSIX tcsendbreak() */
  44 #define FIONCLEX        0x5450  /* these numbers need to be adjusted. */
  45 #define FIOCLEX         0x5451
  46 #define FIOASYNC        0x5452
  47 #define TIOCSERCONFIG   0x5453
  48 #define TIOCSERGWILD    0x5454
  49 #define TIOCSERSWILD    0x5455
  50 #define TIOCGLCKTRMIOS  0x5456
  51 #define TIOCSLCKTRMIOS  0x5457
  52 
  53 /* Used for packet mode */
  54 #define TIOCPKT_FLUSHREAD        1
  55 #define TIOCPKT_FLUSHWRITE       2
  56 #define TIOCPKT_STOP             4
  57 #define TIOCPKT_START            8
  58 #define TIOCPKT_NOSTOP          16
  59 #define TIOCPKT_DOSTOP          32
  60 
  61 struct winsize {
  62         unsigned short ws_row;
  63         unsigned short ws_col;
  64         unsigned short ws_xpixel;
  65         unsigned short ws_ypixel;
  66 };
  67 
  68 #define NCC 8
  69 struct termio {
  70         unsigned short c_iflag;         /* input mode flags */
  71         unsigned short c_oflag;         /* output mode flags */
  72         unsigned short c_cflag;         /* control mode flags */
  73         unsigned short c_lflag;         /* local mode flags */
  74         unsigned char c_line;           /* line discipline */
  75         unsigned char c_cc[NCC];        /* control characters */
  76 };
  77 
  78 #define NCCS 19
  79 struct termios {
  80         tcflag_t c_iflag;               /* input mode flags */
  81         tcflag_t c_oflag;               /* output mode flags */
  82         tcflag_t c_cflag;               /* control mode flags */
  83         tcflag_t c_lflag;               /* local mode flags */
  84         cc_t c_line;                    /* line discipline */
  85         cc_t c_cc[NCCS];                /* control characters */
  86 };
  87 
  88 /* c_cc characters */
  89 #define VINTR 0
  90 #define VQUIT 1
  91 #define VERASE 2
  92 #define VKILL 3
  93 #define VEOF 4
  94 #define VTIME 5
  95 #define VMIN 6
  96 #define VSWTC 7
  97 #define VSTART 8
  98 #define VSTOP 9
  99 #define VSUSP 10
 100 #define VEOL 11
 101 #define VREPRINT 12
 102 #define VDISCARD 13
 103 #define VWERASE 14
 104 #define VLNEXT 15
 105 #define VEOL2 16
 106 
 107 /* c_iflag bits */
 108 #define IGNBRK  0000001
 109 #define BRKINT  0000002
 110 #define IGNPAR  0000004
 111 #define PARMRK  0000010
 112 #define INPCK   0000020
 113 #define ISTRIP  0000040
 114 #define INLCR   0000100
 115 #define IGNCR   0000200
 116 #define ICRNL   0000400
 117 #define IUCLC   0001000
 118 #define IXON    0002000
 119 #define IXANY   0004000
 120 #define IXOFF   0010000
 121 #define IMAXBEL 0020000
 122 
 123 /* c_oflag bits */
 124 #define OPOST   0000001
 125 #define OLCUC   0000002
 126 #define ONLCR   0000004
 127 #define OCRNL   0000010
 128 #define ONOCR   0000020
 129 #define ONLRET  0000040
 130 #define OFILL   0000100
 131 #define OFDEL   0000200
 132 #define NLDLY   0000400
 133 #define   NL0   0000000
 134 #define   NL1   0000400
 135 #define CRDLY   0003000
 136 #define   CR0   0000000
 137 #define   CR1   0001000
 138 #define   CR2   0002000
 139 #define   CR3   0003000
 140 #define TABDLY  0014000
 141 #define   TAB0  0000000
 142 #define   TAB1  0004000
 143 #define   TAB2  0010000
 144 #define   TAB3  0014000
 145 #define   XTABS 0014000
 146 #define BSDLY   0020000
 147 #define   BS0   0000000
 148 #define   BS1   0020000
 149 #define VTDLY   0040000
 150 #define   VT0   0000000
 151 #define   VT1   0040000
 152 #define FFDLY   0040000
 153 #define   FF0   0000000
 154 #define   FF1   0040000
 155 
 156 /* c_cflag bit meaning */
 157 #define CBAUD   0000017
 158 #define  B0     0000000         /* hang up */
 159 #define  B50    0000001
 160 #define  B75    0000002
 161 #define  B110   0000003
 162 #define  B134   0000004
 163 #define  B150   0000005
 164 #define  B200   0000006
 165 #define  B300   0000007
 166 #define  B600   0000010
 167 #define  B1200  0000011
 168 #define  B1800  0000012
 169 #define  B2400  0000013
 170 #define  B4800  0000014
 171 #define  B9600  0000015
 172 #define  B19200 0000016
 173 #define  B38400 0000017
 174 #define EXTA B19200
 175 #define EXTB B38400
 176 #define CSIZE   0000060
 177 #define   CS5   0000000
 178 #define   CS6   0000020
 179 #define   CS7   0000040
 180 #define   CS8   0000060
 181 #define CSTOPB  0000100
 182 #define CREAD   0000200
 183 #define PARENB  0000400
 184 #define PARODD  0001000
 185 #define HUPCL   0002000
 186 #define CLOCAL  0004000
 187 #define CIBAUD  03600000                /* input baud rate (not used) */
 188 #define CRTSCTS   020000000000          /* flow control */
 189 
 190 /* c_lflag bits */
 191 #define ISIG    0000001
 192 #define ICANON  0000002
 193 #define XCASE   0000004
 194 #define ECHO    0000010
 195 #define ECHOE   0000020
 196 #define ECHOK   0000040
 197 #define ECHONL  0000100
 198 #define NOFLSH  0000200
 199 #define TOSTOP  0000400
 200 #define ECHOCTL 0001000
 201 #define ECHOPRT 0002000
 202 #define ECHOKE  0004000
 203 #define FLUSHO  0010000
 204 #define PENDIN  0040000
 205 #define IEXTEN  0100000
 206 
 207 /* modem lines */
 208 #define TIOCM_LE        0x001
 209 #define TIOCM_DTR       0x002
 210 #define TIOCM_RTS       0x004
 211 #define TIOCM_ST        0x008
 212 #define TIOCM_SR        0x010
 213 #define TIOCM_CTS       0x020
 214 #define TIOCM_CAR       0x040
 215 #define TIOCM_RNG       0x080
 216 #define TIOCM_DSR       0x100
 217 #define TIOCM_CD        TIOCM_CAR
 218 #define TIOCM_RI        TIOCM_RNG
 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 /* line disciplines */
 237 #define N_TTY           0
 238 #define N_SLIP          1
 239 #define N_MOUSE         2
 240 
 241 #endif

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