|
RTEMS CPU Kit with SuperCore
4.10.99.0
|
00001 00011 /* 00012 * COPYRIGHT (c) 1989-2011. 00013 * On-Line Applications Research Corporation (OAR). 00014 * 00015 * The license and distribution terms for this file may be 00016 * found in the file LICENSE in this distribution or at 00017 * http://www.rtems.com/license/LICENSE. 00018 */ 00019 00020 #ifndef TERMIOS_H 00021 #define TERMIOS_H 00022 00023 #include <sys/types.h> 00024 00025 #ifdef __cplusplus 00026 extern "C" { 00027 #endif 00028 00037 typedef unsigned char cc_t; 00038 typedef unsigned int speed_t; 00039 typedef unsigned int tcflag_t; 00040 00041 #define NCCS 19 00042 struct termios { 00043 tcflag_t c_iflag; /* input mode flags */ 00044 tcflag_t c_oflag; /* output mode flags */ 00045 tcflag_t c_cflag; /* control mode flags */ 00046 tcflag_t c_lflag; /* local mode flags */ 00047 cc_t c_line; /* line discipline */ 00048 cc_t c_cc[NCCS]; /* control characters */ 00049 }; 00050 00055 #define _POSIX_VDISABLE 0 00056 00057 /* c_cc characters */ 00058 #define VINTR 0 00059 #define VQUIT 1 00060 #define VERASE 2 00061 #define VKILL 3 00062 #define VEOF 4 00063 #define VTIME 5 00064 #define VMIN 6 00065 #define VSWTC 7 00066 #define VSTART 8 00067 #define VSTOP 9 00068 #define VSUSP 10 00069 #define VEOL 11 00070 #define VREPRINT 12 00071 #define VDISCARD 13 00072 #define VWERASE 14 00073 #define VLNEXT 15 00074 #define VEOL2 16 00075 00076 /* c_iflag bits */ 00077 #define IGNBRK 0000001 00078 #define BRKINT 0000002 00079 #define IGNPAR 0000004 00080 #define PARMRK 0000010 00081 #define INPCK 0000020 00082 #define ISTRIP 0000040 00083 #define INLCR 0000100 00084 #define IGNCR 0000200 00085 #define ICRNL 0000400 00086 #define IUCLC 0001000 00087 #define IXON 0002000 00088 #define IXANY 0004000 00089 #define IXOFF 0010000 00090 #define IMAXBEL 0020000 00091 00092 /* c_oflag bits */ 00093 #define OPOST 0000001 00094 #define OLCUC 0000002 00095 #define ONLCR 0000004 00096 #define OCRNL 0000010 00097 #define ONOCR 0000020 00098 #define ONLRET 0000040 00099 #define OFILL 0000100 00100 #define OFDEL 0000200 00101 #define NLDLY 0000400 00102 #define NL0 0000000 00103 #define NL1 0000400 00104 #define CRDLY 0003000 00105 #define CR0 0000000 00106 #define CR1 0001000 00107 #define CR2 0002000 00108 #define CR3 0003000 00109 #define TABDLY 0014000 00110 #define TAB0 0000000 00111 #define TAB1 0004000 00112 #define TAB2 0010000 00113 #define TAB3 0014000 00114 #define XTABS 0014000 00115 #define BSDLY 0020000 00116 #define BS0 0000000 00117 #define BS1 0020000 00118 #define VTDLY 0040000 00119 #define VT0 0000000 00120 #define VT1 0040000 00121 #define FFDLY 0100000 00122 #define FF0 0000000 00123 #define FF1 0100000 00124 00125 /* c_cflag bit meaning */ 00126 #define CBAUD 0010017 00127 #define B0 0000000 /* hang up */ 00128 #define B50 0000001 00129 #define B75 0000002 00130 #define B110 0000003 00131 #define B134 0000004 00132 #define B150 0000005 00133 #define B200 0000006 00134 #define B300 0000007 00135 #define B600 0000010 00136 #define B1200 0000011 00137 #define B1800 0000012 00138 #define B2400 0000013 00139 #define B4800 0000014 00140 #define B9600 0000015 00141 #define B19200 0000016 00142 #define B38400 0000017 00143 #define EXTA B19200 00144 #define EXTB B38400 00145 #define CSIZE 0000060 00146 #define CS5 0000000 00147 #define CS6 0000020 00148 #define CS7 0000040 00149 #define CS8 0000060 00150 #define CSTOPB 0000100 00151 #define CREAD 0000200 00152 #define PARENB 0000400 00153 #define PARODD 0001000 00154 #define HUPCL 0002000 00155 #define CLOCAL 0004000 00156 #define CBAUDEX 0010000 00157 #define B57600 0010001 00158 #define B115200 0010002 00159 #define B230400 0010003 00160 #define B460800 0010004 00161 #define CIBAUD 002003600000 /* input baud rate (not used) */ 00162 #define CRTSCTS 020000000000 /* flow control */ 00163 00164 #define RTEMS_TERMIOS_NUMBER_BAUD_RATES 20 00165 00166 /* c_lflag bits */ 00167 #define ISIG 0000001 00168 #define ICANON 0000002 00169 #define XCASE 0000004 00170 #define ECHO 0000010 00171 #define ECHOE 0000020 00172 #define ECHOK 0000040 00173 #define ECHONL 0000100 00174 #define NOFLSH 0000200 00175 #define TOSTOP 0000400 00176 #define ECHOCTL 0001000 00177 #define ECHOPRT 0002000 00178 #define ECHOKE 0004000 00179 #define FLUSHO 0010000 00180 #define PENDIN 0040000 00181 #define IEXTEN 0100000 00182 00183 /* tcflow() and TCXONC use these */ 00184 #define TCOOFF 0 00185 #define TCOON 1 00186 #define TCIOFF 2 00187 #define TCION 3 00188 00189 /* tcflush() and TCFLSH use these */ 00190 #define TCIFLUSH 0 00191 #define TCOFLUSH 1 00192 #define TCIOFLUSH 2 00193 00194 /* tcsetattr uses these */ 00195 #define TCSANOW 0 00196 #define TCSADRAIN 1 00197 #define TCSAFLUSH 2 00198 00199 int tcdrain(int); 00200 int tcflow(int, int); 00201 int tcflush(int, int); 00202 int tcgetattr(int, struct termios *); 00203 int tcsetattr(int, int, struct termios *); 00204 int tcdrain(int); 00205 pid_t tcgetprgrp(int); 00206 int tcsetprgrp(int, pid_t); 00207 int tcsendbreak(int, int); 00208 speed_t cfgetospeed(const struct termios *tp); 00209 int cfsetospeed(struct termios *tp, speed_t speed); 00210 speed_t cfgetispeed(const struct termios *tp); 00211 int cfsetispeed(struct termios *tp, speed_t speed); 00212 00215 #ifdef __cplusplus 00216 } 00217 #endif 00218 00219 #endif /* TERMIOS_H */
1.7.5