Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at be662a18b7763496a052d489206af9ca2c2e1ac2 234 lines 6.1 kB view raw
1#ifndef _SPARC_TERMBITS_H 2#define _SPARC_TERMBITS_H 3 4#include <linux/posix_types.h> 5 6typedef unsigned char cc_t; 7typedef unsigned int speed_t; 8typedef unsigned long tcflag_t; 9 10#define NCC 8 11struct termio { 12 unsigned short c_iflag; /* input mode flags */ 13 unsigned short c_oflag; /* output mode flags */ 14 unsigned short c_cflag; /* control mode flags */ 15 unsigned short c_lflag; /* local mode flags */ 16 unsigned char c_line; /* line discipline */ 17 unsigned char c_cc[NCC]; /* control characters */ 18}; 19 20#define NCCS 17 21struct termios { 22 tcflag_t c_iflag; /* input mode flags */ 23 tcflag_t c_oflag; /* output mode flags */ 24 tcflag_t c_cflag; /* control mode flags */ 25 tcflag_t c_lflag; /* local mode flags */ 26 cc_t c_line; /* line discipline */ 27 cc_t c_cc[NCCS]; /* control characters */ 28#ifdef __KERNEL__ 29#define SIZEOF_USER_TERMIOS sizeof (struct termios) - (2*sizeof (cc_t)) 30 cc_t _x_cc[2]; /* We need them to hold vmin/vtime */ 31#endif 32}; 33 34/* c_cc characters */ 35#define VINTR 0 36#define VQUIT 1 37#define VERASE 2 38#define VKILL 3 39#define VEOF 4 40#define VEOL 5 41#define VEOL2 6 42#define VSWTC 7 43#define VSTART 8 44#define VSTOP 9 45 46 47 48#define VSUSP 10 49#define VDSUSP 11 /* SunOS POSIX nicety I do believe... */ 50#define VREPRINT 12 51#define VDISCARD 13 52#define VWERASE 14 53#define VLNEXT 15 54 55/* Kernel keeps vmin/vtime separated, user apps assume vmin/vtime is 56 * shared with eof/eol 57 */ 58#ifdef __KERNEL__ 59#define VMIN 16 60#define VTIME 17 61#else 62#define VMIN VEOF 63#define VTIME VEOL 64#endif 65 66/* c_iflag bits */ 67#define IGNBRK 0x00000001 68#define BRKINT 0x00000002 69#define IGNPAR 0x00000004 70#define PARMRK 0x00000008 71#define INPCK 0x00000010 72#define ISTRIP 0x00000020 73#define INLCR 0x00000040 74#define IGNCR 0x00000080 75#define ICRNL 0x00000100 76#define IUCLC 0x00000200 77#define IXON 0x00000400 78#define IXANY 0x00000800 79#define IXOFF 0x00001000 80#define IMAXBEL 0x00002000 81#define IUTF8 0x00004000 82 83/* c_oflag bits */ 84#define OPOST 0x00000001 85#define OLCUC 0x00000002 86#define ONLCR 0x00000004 87#define OCRNL 0x00000008 88#define ONOCR 0x00000010 89#define ONLRET 0x00000020 90#define OFILL 0x00000040 91#define OFDEL 0x00000080 92#define NLDLY 0x00000100 93#define NL0 0x00000000 94#define NL1 0x00000100 95#define CRDLY 0x00000600 96#define CR0 0x00000000 97#define CR1 0x00000200 98#define CR2 0x00000400 99#define CR3 0x00000600 100#define TABDLY 0x00001800 101#define TAB0 0x00000000 102#define TAB1 0x00000800 103#define TAB2 0x00001000 104#define TAB3 0x00001800 105#define XTABS 0x00001800 106#define BSDLY 0x00002000 107#define BS0 0x00000000 108#define BS1 0x00002000 109#define VTDLY 0x00004000 110#define VT0 0x00000000 111#define VT1 0x00004000 112#define FFDLY 0x00008000 113#define FF0 0x00000000 114#define FF1 0x00008000 115#define PAGEOUT 0x00010000 /* SUNOS specific */ 116#define WRAP 0x00020000 /* SUNOS specific */ 117 118/* c_cflag bit meaning */ 119#define CBAUD 0x0000100f 120#define B0 0x00000000 /* hang up */ 121#define B50 0x00000001 122#define B75 0x00000002 123#define B110 0x00000003 124#define B134 0x00000004 125#define B150 0x00000005 126#define B200 0x00000006 127#define B300 0x00000007 128#define B600 0x00000008 129#define B1200 0x00000009 130#define B1800 0x0000000a 131#define B2400 0x0000000b 132#define B4800 0x0000000c 133#define B9600 0x0000000d 134#define B19200 0x0000000e 135#define B38400 0x0000000f 136#define EXTA B19200 137#define EXTB B38400 138#define CSIZE 0x00000030 139#define CS5 0x00000000 140#define CS6 0x00000010 141#define CS7 0x00000020 142#define CS8 0x00000030 143#define CSTOPB 0x00000040 144#define CREAD 0x00000080 145#define PARENB 0x00000100 146#define PARODD 0x00000200 147#define HUPCL 0x00000400 148#define CLOCAL 0x00000800 149#define CBAUDEX 0x00001000 150/* We'll never see these speeds with the Zilogs, but for completeness... */ 151#define B57600 0x00001001 152#define B115200 0x00001002 153#define B230400 0x00001003 154#define B460800 0x00001004 155/* This is what we can do with the Zilogs. */ 156#define B76800 0x00001005 157/* This is what we can do with the SAB82532. */ 158#define B153600 0x00001006 159#define B307200 0x00001007 160#define B614400 0x00001008 161#define B921600 0x00001009 162/* And these are the rest... */ 163#define B500000 0x0000100a 164#define B576000 0x0000100b 165#define B1000000 0x0000100c 166#define B1152000 0x0000100d 167#define B1500000 0x0000100e 168#define B2000000 0x0000100f 169/* These have totally bogus values and nobody uses them 170 so far. Later on we'd have to use say 0x10000x and 171 adjust CBAUD constant and drivers accordingly. 172#define B2500000 0x00001010 173#define B3000000 0x00001011 174#define B3500000 0x00001012 175#define B4000000 0x00001013 */ 176#define CIBAUD 0x100f0000 /* input baud rate (not used) */ 177#define CMSPAR 0x40000000 /* mark or space (stick) parity */ 178#define CRTSCTS 0x80000000 /* flow control */ 179 180/* c_lflag bits */ 181#define ISIG 0x00000001 182#define ICANON 0x00000002 183#define XCASE 0x00000004 184#define ECHO 0x00000008 185#define ECHOE 0x00000010 186#define ECHOK 0x00000020 187#define ECHONL 0x00000040 188#define NOFLSH 0x00000080 189#define TOSTOP 0x00000100 190#define ECHOCTL 0x00000200 191#define ECHOPRT 0x00000400 192#define ECHOKE 0x00000800 193#define DEFECHO 0x00001000 /* SUNOS thing, what is it? */ 194#define FLUSHO 0x00002000 195#define PENDIN 0x00004000 196#define IEXTEN 0x00008000 197 198/* modem lines */ 199#define TIOCM_LE 0x001 200#define TIOCM_DTR 0x002 201#define TIOCM_RTS 0x004 202#define TIOCM_ST 0x008 203#define TIOCM_SR 0x010 204#define TIOCM_CTS 0x020 205#define TIOCM_CAR 0x040 206#define TIOCM_RNG 0x080 207#define TIOCM_DSR 0x100 208#define TIOCM_CD TIOCM_CAR 209#define TIOCM_RI TIOCM_RNG 210#define TIOCM_OUT1 0x2000 211#define TIOCM_OUT2 0x4000 212#define TIOCM_LOOP 0x8000 213 214/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ 215#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ 216 217 218/* tcflow() and TCXONC use these */ 219#define TCOOFF 0 220#define TCOON 1 221#define TCIOFF 2 222#define TCION 3 223 224/* tcflush() and TCFLSH use these */ 225#define TCIFLUSH 0 226#define TCOFLUSH 1 227#define TCIOFLUSH 2 228 229/* tcsetattr uses these */ 230#define TCSANOW 0 231#define TCSADRAIN 1 232#define TCSAFLUSH 2 233 234#endif /* !(_SPARC_TERMBITS_H) */