0001
0002 #ifndef _UAPI_SPARC_TERMBITS_H
0003 #define _UAPI_SPARC_TERMBITS_H
0004
0005 #include <asm-generic/termbits-common.h>
0006
0007 #if defined(__sparc__) && defined(__arch64__)
0008 typedef unsigned int tcflag_t;
0009 #else
0010 typedef unsigned long tcflag_t;
0011 #endif
0012
0013 #define NCC 8
0014 struct termio {
0015 unsigned short c_iflag;
0016 unsigned short c_oflag;
0017 unsigned short c_cflag;
0018 unsigned short c_lflag;
0019 unsigned char c_line;
0020 unsigned char c_cc[NCC];
0021 };
0022
0023 #define NCCS 17
0024 struct termios {
0025 tcflag_t c_iflag;
0026 tcflag_t c_oflag;
0027 tcflag_t c_cflag;
0028 tcflag_t c_lflag;
0029 cc_t c_line;
0030 #ifndef __KERNEL__
0031 cc_t c_cc[NCCS];
0032 #else
0033 cc_t c_cc[NCCS+2];
0034 #define SIZEOF_USER_TERMIOS sizeof (struct termios) - (2*sizeof (cc_t))
0035 #endif
0036 };
0037
0038 struct termios2 {
0039 tcflag_t c_iflag;
0040 tcflag_t c_oflag;
0041 tcflag_t c_cflag;
0042 tcflag_t c_lflag;
0043 cc_t c_line;
0044 cc_t c_cc[NCCS+2];
0045 speed_t c_ispeed;
0046 speed_t c_ospeed;
0047 };
0048
0049 struct ktermios {
0050 tcflag_t c_iflag;
0051 tcflag_t c_oflag;
0052 tcflag_t c_cflag;
0053 tcflag_t c_lflag;
0054 cc_t c_line;
0055 cc_t c_cc[NCCS+2];
0056 speed_t c_ispeed;
0057 speed_t c_ospeed;
0058 };
0059
0060
0061 #define VINTR 0
0062 #define VQUIT 1
0063 #define VERASE 2
0064 #define VKILL 3
0065 #define VEOF 4
0066 #define VEOL 5
0067 #define VEOL2 6
0068 #define VSWTC 7
0069 #define VSTART 8
0070 #define VSTOP 9
0071
0072 #define VSUSP 10
0073 #define VDSUSP 11
0074 #define VREPRINT 12
0075 #define VDISCARD 13
0076 #define VWERASE 14
0077 #define VLNEXT 15
0078
0079
0080
0081
0082 #ifndef __KERNEL__
0083 #define VMIN VEOF
0084 #define VTIME VEOL
0085 #endif
0086
0087
0088 #define IUCLC 0x0200
0089 #define IXON 0x0400
0090 #define IXOFF 0x1000
0091 #define IMAXBEL 0x2000
0092 #define IUTF8 0x4000
0093
0094
0095 #define OLCUC 0x00002
0096 #define ONLCR 0x00004
0097 #define NLDLY 0x00100
0098 #define NL0 0x00000
0099 #define NL1 0x00100
0100 #define CRDLY 0x00600
0101 #define CR0 0x00000
0102 #define CR1 0x00200
0103 #define CR2 0x00400
0104 #define CR3 0x00600
0105 #define TABDLY 0x01800
0106 #define TAB0 0x00000
0107 #define TAB1 0x00800
0108 #define TAB2 0x01000
0109 #define TAB3 0x01800
0110 #define XTABS 0x01800
0111 #define BSDLY 0x02000
0112 #define BS0 0x00000
0113 #define BS1 0x02000
0114 #define VTDLY 0x04000
0115 #define VT0 0x00000
0116 #define VT1 0x04000
0117 #define FFDLY 0x08000
0118 #define FF0 0x00000
0119 #define FF1 0x08000
0120 #define PAGEOUT 0x10000
0121 #define WRAP 0x20000
0122
0123
0124 #define CBAUD 0x0000100f
0125 #define CSIZE 0x00000030
0126 #define CS5 0x00000000
0127 #define CS6 0x00000010
0128 #define CS7 0x00000020
0129 #define CS8 0x00000030
0130 #define CSTOPB 0x00000040
0131 #define CREAD 0x00000080
0132 #define PARENB 0x00000100
0133 #define PARODD 0x00000200
0134 #define HUPCL 0x00000400
0135 #define CLOCAL 0x00000800
0136 #define CBAUDEX 0x00001000
0137
0138 #define BOTHER 0x00001000
0139 #define B57600 0x00001001
0140 #define B115200 0x00001002
0141 #define B230400 0x00001003
0142 #define B460800 0x00001004
0143
0144 #define B76800 0x00001005
0145
0146 #define B153600 0x00001006
0147 #define B307200 0x00001007
0148 #define B614400 0x00001008
0149 #define B921600 0x00001009
0150
0151 #define B500000 0x0000100a
0152 #define B576000 0x0000100b
0153 #define B1000000 0x0000100c
0154 #define B1152000 0x0000100d
0155 #define B1500000 0x0000100e
0156 #define B2000000 0x0000100f
0157
0158
0159
0160
0161
0162
0163
0164 #define CIBAUD 0x100f0000
0165
0166
0167 #define ISIG 0x00000001
0168 #define ICANON 0x00000002
0169 #define XCASE 0x00000004
0170 #define ECHO 0x00000008
0171 #define ECHOE 0x00000010
0172 #define ECHOK 0x00000020
0173 #define ECHONL 0x00000040
0174 #define NOFLSH 0x00000080
0175 #define TOSTOP 0x00000100
0176 #define ECHOCTL 0x00000200
0177 #define ECHOPRT 0x00000400
0178 #define ECHOKE 0x00000800
0179 #define DEFECHO 0x00001000
0180 #define FLUSHO 0x00002000
0181 #define PENDIN 0x00004000
0182 #define IEXTEN 0x00008000
0183 #define EXTPROC 0x00010000
0184
0185
0186 #define TIOCM_LE 0x001
0187 #define TIOCM_DTR 0x002
0188 #define TIOCM_RTS 0x004
0189 #define TIOCM_ST 0x008
0190 #define TIOCM_SR 0x010
0191 #define TIOCM_CTS 0x020
0192 #define TIOCM_CAR 0x040
0193 #define TIOCM_RNG 0x080
0194 #define TIOCM_DSR 0x100
0195 #define TIOCM_CD TIOCM_CAR
0196 #define TIOCM_RI TIOCM_RNG
0197 #define TIOCM_OUT1 0x2000
0198 #define TIOCM_OUT2 0x4000
0199 #define TIOCM_LOOP 0x8000
0200
0201
0202 #define TIOCSER_TEMT 0x01
0203
0204
0205 #define TCSANOW 0
0206 #define TCSADRAIN 1
0207 #define TCSAFLUSH 2
0208
0209 #endif