1 /****************************************************************************** 2 * * 3 * License Agreement * 4 * * 5 * Copyright (c) 2004 Altera Corporation, San Jose, California, USA. * 6 * All rights reserved. * 7 * * 8 * Permission is hereby granted, free of charge, to any person obtaining a * 9 * copy of this software and associated documentation files (the "Software"), * 10 * to deal in the Software without restriction, including without limitation * 11 * the rights to use, copy, modify, merge, publish, distribute, sublicense, * 12 * and/or sell copies of the Software, and to permit persons to whom the * 13 * Software is furnished to do so, subject to the following conditions: * 14 * * 15 * The above copyright notice and this permission notice shall be included in * 16 * all copies or substantial portions of the Software. * 17 * * 18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * 19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * 20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * 21 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * 22 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * 23 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * 24 * DEALINGS IN THE SOFTWARE. * 25 * * 26 * * 27 * Altera does not recommend, suggest or require that this reference design * 28 * file be used in conjunction or combination with any other product. * 29 ******************************************************************************/ 30 31 /****************************************************************************** 32 * * 33 * THIS IS A LIBRARY READ-ONLY SOURCE FILE. DO NOT EDIT. * 34 * * 35 ******************************************************************************/ 36 37 /* 38 * This is the termios.h file provided with newlib. The only modification has 39 * been to the baud rate macro definitions, and an increase in the size of the 40 * termios structure to accomodate this. 41 */ 42 43 44 #ifndef _SYS_TERMIOS_H 45 # define _SYS_TERMIOS_H 46 47 #ifdef __cplusplus 48 extern "C" 49 { 50 #endif /* __cplusplus */ 51 52 # define _XCGETA (('x'<<8)|1) 53 # define _XCSETA (('x'<<8)|2) 54 # define _XCSETAW (('x'<<8)|3) 55 # define _XCSETAF (('x'<<8)|4) 56 # define _TCSBRK (('T'<<8)|5) 57 # define _TCFLSH (('T'<<8)|7) 58 # define _TCXONC (('T'<<8)|6) 59 60 # define TCOOFF 0 61 # define TCOON 1 62 # define TCIOFF 2 63 # define TCION 3 64 65 # define TCIFLUSH 0 66 # define TCOFLUSH 1 67 # define TCIOFLUSH 2 68 69 # define NCCS 13 70 71 # define TCSAFLUSH _XCSETAF 72 # define TCSANOW _XCSETA 73 # define TCSADRAIN _XCSETAW 74 # define TCSADFLUSH _XCSETAF 75 76 # define IGNBRK 000001 77 # define BRKINT 000002 78 # define IGNPAR 000004 79 # define INPCK 000020 80 # define ISTRIP 000040 81 # define INLCR 000100 82 # define IGNCR 000200 83 # define ICRNL 000400 84 # define IXON 002000 85 # define IXOFF 010000 86 87 # define OPOST 000001 88 # define OCRNL 000004 89 # define ONLCR 000010 90 # define ONOCR 000020 91 # define TAB3 014000 92 93 # define CLOCAL 004000 94 # define CREAD 000200 95 # define CSIZE 000060 96 # define CS5 0 97 # define CS6 020 98 # define CS7 040 99 # define CS8 060 100 # define CSTOPB 000100 101 # define HUPCL 002000 102 # define PARENB 000400 103 # define PAODD 001000 104 105 #define CCTS_OFLOW 010000 106 #define CRTS_IFLOW 020000 107 #define CRTSCTS (CCTS_OFLOW | CRTS_IFLOW) 108 109 # define ECHO 0000010 110 # define ECHOE 0000020 111 # define ECHOK 0000040 112 # define ECHONL 0000100 113 # define ICANON 0000002 114 # define IEXTEN 0000400 /* anybody know *what* this does?! */ 115 # define ISIG 0000001 116 # define NOFLSH 0000200 117 # define TOSTOP 0001000 118 119 # define VEOF 4 /* also VMIN -- thanks, AT&T */ 120 # define VEOL 5 /* also VTIME -- thanks again */ 121 # define VERASE 2 122 # define VINTR 0 123 # define VKILL 3 124 # define VMIN 4 /* also VEOF */ 125 # define VQUIT 1 126 # define VSUSP 10 127 # define VTIME 5 /* also VEOL */ 128 # define VSTART 11 129 # define VSTOP 12 130 131 # define B0 0 132 # define B50 50 133 # define B75 75 134 # define B110 110 135 # define B134 134 136 # define B150 150 137 # define B200 200 138 # define B300 300 139 # define B600 600 140 # define B1200 1200 141 # define B1800 1800 142 # define B2400 2400 143 # define B4800 4800 144 # define B9600 9600 145 # define B19200 19200 146 # define B38400 38400 147 # define B57600 57600 148 # define B115200 115200 149 150 typedef unsigned char cc_t; 151 typedef unsigned short tcflag_t; 152 typedef unsigned long speed_t; 153 154 struct termios { 155 tcflag_t c_iflag; 156 tcflag_t c_oflag; 157 tcflag_t c_cflag; 158 tcflag_t c_lflag; 159 char c_line; 160 cc_t c_cc[NCCS]; 161 speed_t c_ispeed; 162 speed_t c_ospeed; 163 }; 164 165 # ifndef _NO_MACROS 166 167 # define cfgetospeed(tp) ((tp)->c_ospeed) 168 # define cfgetispeed(tp) ((tp)->c_ispeed) 169 # define cfsetospeed(tp,s) (((tp)->c_ospeed = (s)), 0) 170 # define cfsetispeed(tp,s) (((tp)->c_ispeed = (s)), 0) 171 # define tcdrain(fd) _ioctl (fd, _TCSBRK, 1) 172 # endif /* _NO_MACROS */ 173 174 #ifdef __cplusplus 175 } 176 #endif 177 178 #endif /* _SYS_TERMIOS_H */ 179