Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
0002 #ifndef __ASM_GENERIC_TERMBITS_H
0003 #define __ASM_GENERIC_TERMBITS_H
0004 
0005 #include <asm-generic/termbits-common.h>
0006 
0007 typedef unsigned int    tcflag_t;
0008 
0009 #define NCCS 19
0010 struct termios {
0011     tcflag_t c_iflag;       /* input mode flags */
0012     tcflag_t c_oflag;       /* output mode flags */
0013     tcflag_t c_cflag;       /* control mode flags */
0014     tcflag_t c_lflag;       /* local mode flags */
0015     cc_t c_line;            /* line discipline */
0016     cc_t c_cc[NCCS];        /* control characters */
0017 };
0018 
0019 struct termios2 {
0020     tcflag_t c_iflag;       /* input mode flags */
0021     tcflag_t c_oflag;       /* output mode flags */
0022     tcflag_t c_cflag;       /* control mode flags */
0023     tcflag_t c_lflag;       /* local mode flags */
0024     cc_t c_line;            /* line discipline */
0025     cc_t c_cc[NCCS];        /* control characters */
0026     speed_t c_ispeed;       /* input speed */
0027     speed_t c_ospeed;       /* output speed */
0028 };
0029 
0030 struct ktermios {
0031     tcflag_t c_iflag;       /* input mode flags */
0032     tcflag_t c_oflag;       /* output mode flags */
0033     tcflag_t c_cflag;       /* control mode flags */
0034     tcflag_t c_lflag;       /* local mode flags */
0035     cc_t c_line;            /* line discipline */
0036     cc_t c_cc[NCCS];        /* control characters */
0037     speed_t c_ispeed;       /* input speed */
0038     speed_t c_ospeed;       /* output speed */
0039 };
0040 
0041 /* c_cc characters */
0042 #define VINTR        0
0043 #define VQUIT        1
0044 #define VERASE       2
0045 #define VKILL        3
0046 #define VEOF         4
0047 #define VTIME        5
0048 #define VMIN         6
0049 #define VSWTC        7
0050 #define VSTART       8
0051 #define VSTOP        9
0052 #define VSUSP       10
0053 #define VEOL        11
0054 #define VREPRINT    12
0055 #define VDISCARD    13
0056 #define VWERASE     14
0057 #define VLNEXT      15
0058 #define VEOL2       16
0059 
0060 /* c_iflag bits */
0061 #define IUCLC   0x0200
0062 #define IXON    0x0400
0063 #define IXOFF   0x1000
0064 #define IMAXBEL 0x2000
0065 #define IUTF8   0x4000
0066 
0067 /* c_oflag bits */
0068 #define OLCUC   0x00002
0069 #define ONLCR   0x00004
0070 #define NLDLY   0x00100
0071 #define   NL0   0x00000
0072 #define   NL1   0x00100
0073 #define CRDLY   0x00600
0074 #define   CR0   0x00000
0075 #define   CR1   0x00200
0076 #define   CR2   0x00400
0077 #define   CR3   0x00600
0078 #define TABDLY  0x01800
0079 #define   TAB0  0x00000
0080 #define   TAB1  0x00800
0081 #define   TAB2  0x01000
0082 #define   TAB3  0x01800
0083 #define   XTABS 0x01800
0084 #define BSDLY   0x02000
0085 #define   BS0   0x00000
0086 #define   BS1   0x02000
0087 #define VTDLY   0x04000
0088 #define   VT0   0x00000
0089 #define   VT1   0x04000
0090 #define FFDLY   0x08000
0091 #define   FF0   0x00000
0092 #define   FF1   0x08000
0093 
0094 /* c_cflag bit meaning */
0095 #define CBAUD       0x0000100f
0096 #define CSIZE       0x00000030
0097 #define   CS5       0x00000000
0098 #define   CS6       0x00000010
0099 #define   CS7       0x00000020
0100 #define   CS8       0x00000030
0101 #define CSTOPB      0x00000040
0102 #define CREAD       0x00000080
0103 #define PARENB      0x00000100
0104 #define PARODD      0x00000200
0105 #define HUPCL       0x00000400
0106 #define CLOCAL      0x00000800
0107 #define CBAUDEX     0x00001000
0108 #define BOTHER      0x00001000
0109 #define     B57600  0x00001001
0110 #define    B115200  0x00001002
0111 #define    B230400  0x00001003
0112 #define    B460800  0x00001004
0113 #define    B500000  0x00001005
0114 #define    B576000  0x00001006
0115 #define    B921600  0x00001007
0116 #define   B1000000  0x00001008
0117 #define   B1152000  0x00001009
0118 #define   B1500000  0x0000100a
0119 #define   B2000000  0x0000100b
0120 #define   B2500000  0x0000100c
0121 #define   B3000000  0x0000100d
0122 #define   B3500000  0x0000100e
0123 #define   B4000000  0x0000100f
0124 #define CIBAUD      0x100f0000  /* input baud rate */
0125 
0126 /* c_lflag bits */
0127 #define ISIG    0x00001
0128 #define ICANON  0x00002
0129 #define XCASE   0x00004
0130 #define ECHO    0x00008
0131 #define ECHOE   0x00010
0132 #define ECHOK   0x00020
0133 #define ECHONL  0x00040
0134 #define NOFLSH  0x00080
0135 #define TOSTOP  0x00100
0136 #define ECHOCTL 0x00200
0137 #define ECHOPRT 0x00400
0138 #define ECHOKE  0x00800
0139 #define FLUSHO  0x01000
0140 #define PENDIN  0x04000
0141 #define IEXTEN  0x08000
0142 #define EXTPROC 0x10000
0143 
0144 /* tcsetattr uses these */
0145 #define TCSANOW     0
0146 #define TCSADRAIN   1
0147 #define TCSAFLUSH   2
0148 
0149 #endif /* __ASM_GENERIC_TERMBITS_H */