| @@ -2,10 +2,8 @@ · 1 unmodified line |
| 2 | 2 | #ifndef __ASM_GENERIC_TERMBITS_H |
| 3 | 3 | #define __ASM_GENERIC_TERMBITS_H |
| 4 | 4 | |
| 5 | | −#include <linux/posix_types.h> |
| 5 | +#include <asm-generic/termbits-common.h> |
| 6 | 6 | |
| 7 | | −typedef unsigned char cc_t; |
| 8 | | −typedef unsigned int speed_t; |
| 9 | 7 | typedef unsigned int tcflag_t; |
| 10 | 8 | |
| 11 | 9 | #define NCCS 19 |
| @@ -41,156 +39,107 @@ struct ktermios { · 29 unmodified lines |
| 41 | 39 | }; |
| 42 | 40 | |
| 43 | 41 | /* c_cc characters */ |
| 44 | | −#define VINTR 0 |
| 45 | | −#define VQUIT 1 |
| 46 | | −#define VERASE 2 |
| 47 | | −#define VKILL 3 |
| 48 | | −#define VEOF 4 |
| 49 | | −#define VTIME 5 |
| 50 | | −#define VMIN 6 |
| 51 | | −#define VSWTC 7 |
| 52 | | −#define VSTART 8 |
| 53 | | −#define VSTOP 9 |
| 54 | | −#define VSUSP 10 |
| 55 | | −#define VEOL 11 |
| 56 | | −#define VREPRINT 12 |
| 57 | | −#define VDISCARD 13 |
| 58 | | −#define VWERASE 14 |
| 59 | | −#define VLNEXT 15 |
| 60 | | −#define VEOL2 16 |
| 42 | +#define VINTR 0 |
| 43 | +#define VQUIT 1 |
| 44 | +#define VERASE 2 |
| 45 | +#define VKILL 3 |
| 46 | +#define VEOF 4 |
| 47 | +#define VTIME 5 |
| 48 | +#define VMIN 6 |
| 49 | +#define VSWTC 7 |
| 50 | +#define VSTART 8 |
| 51 | +#define VSTOP 9 |
| 52 | +#define VSUSP 10 |
| 53 | +#define VEOL 11 |
| 54 | +#define VREPRINT 12 |
| 55 | +#define VDISCARD 13 |
| 56 | +#define VWERASE 14 |
| 57 | +#define VLNEXT 15 |
| 58 | +#define VEOL2 16 |
| 61 | 59 | |
| 62 | 60 | /* c_iflag bits */ |
| 63 | | −#define IGNBRK 0000001 |
| 64 | | −#define BRKINT 0000002 |
| 65 | | −#define IGNPAR 0000004 |
| 66 | | −#define PARMRK 0000010 |
| 67 | | −#define INPCK 0000020 |
| 68 | | −#define ISTRIP 0000040 |
| 69 | | −#define INLCR 0000100 |
| 70 | | −#define IGNCR 0000200 |
| 71 | | −#define ICRNL 0000400 |
| 72 | | −#define IUCLC 0001000 |
| 73 | | −#define IXON 0002000 |
| 74 | | −#define IXANY 0004000 |
| 75 | | −#define IXOFF 0010000 |
| 76 | | −#define IMAXBEL 0020000 |
| 77 | | −#define IUTF8 0040000 |
| 61 | +#define IUCLC 0x0200 |
| 62 | +#define IXON 0x0400 |
| 63 | +#define IXOFF 0x1000 |
| 64 | +#define IMAXBEL 0x2000 |
| 65 | +#define IUTF8 0x4000 |
| 78 | 66 | |
| 79 | 67 | /* c_oflag bits */ |
| 80 | | −#define OPOST 0000001 |
| 81 | | −#define OLCUC 0000002 |
| 82 | | −#define ONLCR 0000004 |
| 83 | | −#define OCRNL 0000010 |
| 84 | | −#define ONOCR 0000020 |
| 85 | | −#define ONLRET 0000040 |
| 86 | | −#define OFILL 0000100 |
| 87 | | −#define OFDEL 0000200 |
| 88 | | −#define NLDLY 0000400 |
| 89 | | −#define NL0 0000000 |
| 90 | | −#define NL1 0000400 |
| 91 | | −#define CRDLY 0003000 |
| 92 | | −#define CR0 0000000 |
| 93 | | −#define CR1 0001000 |
| 94 | | −#define CR2 0002000 |
| 95 | | −#define CR3 0003000 |
| 96 | | −#define TABDLY 0014000 |
| 97 | | −#define TAB0 0000000 |
| 98 | | −#define TAB1 0004000 |
| 99 | | −#define TAB2 0010000 |
| 100 | | −#define TAB3 0014000 |
| 101 | | −#define XTABS 0014000 |
| 102 | | −#define BSDLY 0020000 |
| 103 | | −#define BS0 0000000 |
| 104 | | −#define BS1 0020000 |
| 105 | | −#define VTDLY 0040000 |
| 106 | | −#define VT0 0000000 |
| 107 | | −#define VT1 0040000 |
| 108 | | −#define FFDLY 0100000 |
| 109 | | −#define FF0 0000000 |
| 110 | | −#define FF1 0100000 |
| 68 | +#define OLCUC 0x00002 |
| 69 | +#define ONLCR 0x00004 |
| 70 | +#define NLDLY 0x00100 |
| 71 | +#define NL0 0x00000 |
| 72 | +#define NL1 0x00100 |
| 73 | +#define CRDLY 0x00600 |
| 74 | +#define CR0 0x00000 |
| 75 | +#define CR1 0x00200 |
| 76 | +#define CR2 0x00400 |
| 77 | +#define CR3 0x00600 |
| 78 | +#define TABDLY 0x01800 |
| 79 | +#define TAB0 0x00000 |
| 80 | +#define TAB1 0x00800 |
| 81 | +#define TAB2 0x01000 |
| 82 | +#define TAB3 0x01800 |
| 83 | +#define XTABS 0x01800 |
| 84 | +#define BSDLY 0x02000 |
| 85 | +#define BS0 0x00000 |
| 86 | +#define BS1 0x02000 |
| 87 | +#define VTDLY 0x04000 |
| 88 | +#define VT0 0x00000 |
| 89 | +#define VT1 0x04000 |
| 90 | +#define FFDLY 0x08000 |
| 91 | +#define FF0 0x00000 |
| 92 | +#define FF1 0x08000 |
| 111 | 93 | |
| 112 | 94 | /* c_cflag bit meaning */ |
| 113 | | −#define CBAUD 0010017 |
| 114 | | −#define B0 0000000 /* hang up */ |
| 115 | | −#define B50 0000001 |
| 116 | | −#define B75 0000002 |
| 117 | | −#define B110 0000003 |
| 118 | | −#define B134 0000004 |
| 119 | | −#define B150 0000005 |
| 120 | | −#define B200 0000006 |
| 121 | | −#define B300 0000007 |
| 122 | | −#define B600 0000010 |
| 123 | | −#define B1200 0000011 |
| 124 | | −#define B1800 0000012 |
| 125 | | −#define B2400 0000013 |
| 126 | | −#define B4800 0000014 |
| 127 | | −#define B9600 0000015 |
| 128 | | −#define B19200 0000016 |
| 129 | | −#define B38400 0000017 |
| 130 | | −#define EXTA B19200 |
| 131 | | −#define EXTB B38400 |
| 132 | | −#define CSIZE 0000060 |
| 133 | | −#define CS5 0000000 |
| 134 | | −#define CS6 0000020 |
| 135 | | −#define CS7 0000040 |
| 136 | | −#define CS8 0000060 |
| 137 | | −#define CSTOPB 0000100 |
| 138 | | −#define CREAD 0000200 |
| 139 | | −#define PARENB 0000400 |
| 140 | | −#define PARODD 0001000 |
| 141 | | −#define HUPCL 0002000 |
| 142 | | −#define CLOCAL 0004000 |
| 143 | | −#define CBAUDEX 0010000 |
| 144 | | −#define BOTHER 0010000 |
| 145 | | −#define B57600 0010001 |
| 146 | | −#define B115200 0010002 |
| 147 | | −#define B230400 0010003 |
| 148 | | −#define B460800 0010004 |
| 149 | | −#define B500000 0010005 |
| 150 | | −#define B576000 0010006 |
| 151 | | −#define B921600 0010007 |
| 152 | | −#define B1000000 0010010 |
| 153 | | −#define B1152000 0010011 |
| 154 | | −#define B1500000 0010012 |
| 155 | | −#define B2000000 0010013 |
| 156 | | −#define B2500000 0010014 |
| 157 | | −#define B3000000 0010015 |
| 158 | | −#define B3500000 0010016 |
| 159 | | −#define B4000000 0010017 |
| 160 | | −#define CIBAUD 002003600000 /* input baud rate */ |
| 161 | | −#define CMSPAR 010000000000 /* mark or space (stick) parity */ |
| 162 | | −#define CRTSCTS 020000000000 /* flow control */ |
| 163 | | − |
| 164 | | −#define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */ |
| 95 | +#define CBAUD 0x0000100f |
| 96 | +#define CSIZE 0x00000030 |
| 97 | +#define CS5 0x00000000 |
| 98 | +#define CS6 0x00000010 |
| 99 | +#define CS7 0x00000020 |
| 100 | +#define CS8 0x00000030 |
| 101 | +#define CSTOPB 0x00000040 |
| 102 | +#define CREAD 0x00000080 |
| 103 | +#define PARENB 0x00000100 |
| 104 | +#define PARODD 0x00000200 |
| 105 | +#define HUPCL 0x00000400 |
| 106 | +#define CLOCAL 0x00000800 |
| 107 | +#define CBAUDEX 0x00001000 |
| 108 | +#define BOTHER 0x00001000 |
| 109 | +#define B57600 0x00001001 |
| 110 | +#define B115200 0x00001002 |
| 111 | +#define B230400 0x00001003 |
| 112 | +#define B460800 0x00001004 |
| 113 | +#define B500000 0x00001005 |
| 114 | +#define B576000 0x00001006 |
| 115 | +#define B921600 0x00001007 |
| 116 | +#define B1000000 0x00001008 |
| 117 | +#define B1152000 0x00001009 |
| 118 | +#define B1500000 0x0000100a |
| 119 | +#define B2000000 0x0000100b |
| 120 | +#define B2500000 0x0000100c |
| 121 | +#define B3000000 0x0000100d |
| 122 | +#define B3500000 0x0000100e |
| 123 | +#define B4000000 0x0000100f |
| 124 | +#define CIBAUD 0x100f0000 /* input baud rate */ |
| 165 | 125 | |
| 166 | 126 | /* c_lflag bits */ |
| 167 | | −#define ISIG 0000001 |
| 168 | | −#define ICANON 0000002 |
| 169 | | −#define XCASE 0000004 |
| 170 | | −#define ECHO 0000010 |
| 171 | | −#define ECHOE 0000020 |
| 172 | | −#define ECHOK 0000040 |
| 173 | | −#define ECHONL 0000100 |
| 174 | | −#define NOFLSH 0000200 |
| 175 | | −#define TOSTOP 0000400 |
| 176 | | −#define ECHOCTL 0001000 |
| 177 | | −#define ECHOPRT 0002000 |
| 178 | | −#define ECHOKE 0004000 |
| 179 | | −#define FLUSHO 0010000 |
| 180 | | −#define PENDIN 0040000 |
| 181 | | −#define IEXTEN 0100000 |
| 182 | | −#define EXTPROC 0200000 |
| 183 | | − |
| 184 | | −/* tcflow() and TCXONC use these */ |
| 185 | | −#define TCOOFF 0 |
| 186 | | −#define TCOON 1 |
| 187 | | −#define TCIOFF 2 |
| 188 | | −#define TCION 3 |
| 189 | | − |
| 190 | | −/* tcflush() and TCFLSH use these */ |
| 191 | | −#define TCIFLUSH 0 |
| 192 | | −#define TCOFLUSH 1 |
| 193 | | −#define TCIOFLUSH 2 |
| 127 | +#define ISIG 0x00001 |
| 128 | +#define ICANON 0x00002 |
| 129 | +#define XCASE 0x00004 |
| 130 | +#define ECHO 0x00008 |
| 131 | +#define ECHOE 0x00010 |
| 132 | +#define ECHOK 0x00020 |
| 133 | +#define ECHONL 0x00040 |
| 134 | +#define NOFLSH 0x00080 |
| 135 | +#define TOSTOP 0x00100 |
| 136 | +#define ECHOCTL 0x00200 |
| 137 | +#define ECHOPRT 0x00400 |
| 138 | +#define ECHOKE 0x00800 |
| 139 | +#define FLUSHO 0x01000 |
| 140 | +#define PENDIN 0x04000 |
| 141 | +#define IEXTEN 0x08000 |
| 142 | +#define EXTPROC 0x10000 |
| 194 | 143 | |
| 195 | 144 | /* tcsetattr uses these */ |
| 196 | 145 | #define TCSANOW 0 |