| 1 |
2 |
alfik |
/******************************************************************************
|
| 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 |
|
|
* This agreement shall be governed in all respects by the laws of the State *
|
| 27 |
|
|
* of California and by the laws of the United States of America. *
|
| 28 |
|
|
* *
|
| 29 |
|
|
* Altera does not recommend, suggest or require that this reference design *
|
| 30 |
|
|
* file be used in conjunction or combination with any other product. *
|
| 31 |
|
|
******************************************************************************/
|
| 32 |
|
|
|
| 33 |
|
|
/******************************************************************************
|
| 34 |
|
|
* *
|
| 35 |
|
|
* THIS IS A LIBRARY READ-ONLY SOURCE FILE. DO NOT EDIT. *
|
| 36 |
|
|
* *
|
| 37 |
|
|
******************************************************************************/
|
| 38 |
|
|
|
| 39 |
|
|
/*
|
| 40 |
|
|
* This is the termios.h file provided with newlib. The only modification has
|
| 41 |
|
|
* been to the baud rate macro definitions, and an increase in the size of the
|
| 42 |
|
|
* termios structure to accomodate this.
|
| 43 |
|
|
*/
|
| 44 |
|
|
|
| 45 |
|
|
|
| 46 |
|
|
#ifndef _SYS_TERMIOS_H
|
| 47 |
|
|
# define _SYS_TERMIOS_H
|
| 48 |
|
|
|
| 49 |
|
|
#ifdef __cplusplus
|
| 50 |
|
|
extern "C"
|
| 51 |
|
|
{
|
| 52 |
|
|
#endif /* __cplusplus */
|
| 53 |
|
|
|
| 54 |
|
|
# define _XCGETA (('x'<<8)|1)
|
| 55 |
|
|
# define _XCSETA (('x'<<8)|2)
|
| 56 |
|
|
# define _XCSETAW (('x'<<8)|3)
|
| 57 |
|
|
# define _XCSETAF (('x'<<8)|4)
|
| 58 |
|
|
# define _TCSBRK (('T'<<8)|5)
|
| 59 |
|
|
# define _TCFLSH (('T'<<8)|7)
|
| 60 |
|
|
# define _TCXONC (('T'<<8)|6)
|
| 61 |
|
|
|
| 62 |
|
|
# define TCOOFF 0
|
| 63 |
|
|
# define TCOON 1
|
| 64 |
|
|
# define TCIOFF 2
|
| 65 |
|
|
# define TCION 3
|
| 66 |
|
|
|
| 67 |
|
|
# define TCIFLUSH 0
|
| 68 |
|
|
# define TCOFLUSH 1
|
| 69 |
|
|
# define TCIOFLUSH 2
|
| 70 |
|
|
|
| 71 |
|
|
# define NCCS 13
|
| 72 |
|
|
|
| 73 |
|
|
# define TCSAFLUSH _XCSETAF
|
| 74 |
|
|
# define TCSANOW _XCSETA
|
| 75 |
|
|
# define TCSADRAIN _XCSETAW
|
| 76 |
|
|
# define TCSADFLUSH _XCSETAF
|
| 77 |
|
|
|
| 78 |
|
|
# define IGNBRK 000001
|
| 79 |
|
|
# define BRKINT 000002
|
| 80 |
|
|
# define IGNPAR 000004
|
| 81 |
|
|
# define INPCK 000020
|
| 82 |
|
|
# define ISTRIP 000040
|
| 83 |
|
|
# define INLCR 000100
|
| 84 |
|
|
# define IGNCR 000200
|
| 85 |
|
|
# define ICRNL 000400
|
| 86 |
|
|
# define IXON 002000
|
| 87 |
|
|
# define IXOFF 010000
|
| 88 |
|
|
|
| 89 |
|
|
# define OPOST 000001
|
| 90 |
|
|
# define OCRNL 000004
|
| 91 |
|
|
# define ONLCR 000010
|
| 92 |
|
|
# define ONOCR 000020
|
| 93 |
|
|
# define TAB3 014000
|
| 94 |
|
|
|
| 95 |
|
|
# define CLOCAL 004000
|
| 96 |
|
|
# define CREAD 000200
|
| 97 |
|
|
# define CSIZE 000060
|
| 98 |
|
|
# define CS5 0
|
| 99 |
|
|
# define CS6 020
|
| 100 |
|
|
# define CS7 040
|
| 101 |
|
|
# define CS8 060
|
| 102 |
|
|
# define CSTOPB 000100
|
| 103 |
|
|
# define HUPCL 002000
|
| 104 |
|
|
# define PARENB 000400
|
| 105 |
|
|
# define PAODD 001000
|
| 106 |
|
|
|
| 107 |
|
|
#define CCTS_OFLOW 010000
|
| 108 |
|
|
#define CRTS_IFLOW 020000
|
| 109 |
|
|
#define CRTSCTS (CCTS_OFLOW | CRTS_IFLOW)
|
| 110 |
|
|
|
| 111 |
|
|
# define ECHO 0000010
|
| 112 |
|
|
# define ECHOE 0000020
|
| 113 |
|
|
# define ECHOK 0000040
|
| 114 |
|
|
# define ECHONL 0000100
|
| 115 |
|
|
# define ICANON 0000002
|
| 116 |
|
|
# define IEXTEN 0000400 /* anybody know *what* this does?! */
|
| 117 |
|
|
# define ISIG 0000001
|
| 118 |
|
|
# define NOFLSH 0000200
|
| 119 |
|
|
# define TOSTOP 0001000
|
| 120 |
|
|
|
| 121 |
|
|
# define VEOF 4 /* also VMIN -- thanks, AT&T */
|
| 122 |
|
|
# define VEOL 5 /* also VTIME -- thanks again */
|
| 123 |
|
|
# define VERASE 2
|
| 124 |
|
|
# define VINTR 0
|
| 125 |
|
|
# define VKILL 3
|
| 126 |
|
|
# define VMIN 4 /* also VEOF */
|
| 127 |
|
|
# define VQUIT 1
|
| 128 |
|
|
# define VSUSP 10
|
| 129 |
|
|
# define VTIME 5 /* also VEOL */
|
| 130 |
|
|
# define VSTART 11
|
| 131 |
|
|
# define VSTOP 12
|
| 132 |
|
|
|
| 133 |
|
|
# define B0 0
|
| 134 |
|
|
# define B50 50
|
| 135 |
|
|
# define B75 75
|
| 136 |
|
|
# define B110 110
|
| 137 |
|
|
# define B134 134
|
| 138 |
|
|
# define B150 150
|
| 139 |
|
|
# define B200 200
|
| 140 |
|
|
# define B300 300
|
| 141 |
|
|
# define B600 600
|
| 142 |
|
|
# define B1200 1200
|
| 143 |
|
|
# define B1800 1800
|
| 144 |
|
|
# define B2400 2400
|
| 145 |
|
|
# define B4800 4800
|
| 146 |
|
|
# define B9600 9600
|
| 147 |
|
|
# define B19200 19200
|
| 148 |
|
|
# define B38400 38400
|
| 149 |
|
|
# define B57600 57600
|
| 150 |
|
|
# define B115200 115200
|
| 151 |
|
|
|
| 152 |
|
|
typedef unsigned char cc_t;
|
| 153 |
|
|
typedef unsigned short tcflag_t;
|
| 154 |
|
|
typedef unsigned long speed_t;
|
| 155 |
|
|
|
| 156 |
|
|
struct termios {
|
| 157 |
|
|
tcflag_t c_iflag;
|
| 158 |
|
|
tcflag_t c_oflag;
|
| 159 |
|
|
tcflag_t c_cflag;
|
| 160 |
|
|
tcflag_t c_lflag;
|
| 161 |
|
|
char c_line;
|
| 162 |
|
|
cc_t c_cc[NCCS];
|
| 163 |
|
|
speed_t c_ispeed;
|
| 164 |
|
|
speed_t c_ospeed;
|
| 165 |
|
|
};
|
| 166 |
|
|
|
| 167 |
|
|
# ifndef _NO_MACROS
|
| 168 |
|
|
|
| 169 |
|
|
# define cfgetospeed(tp) ((tp)->c_ospeed)
|
| 170 |
|
|
# define cfgetispeed(tp) ((tp)->c_ispeed)
|
| 171 |
|
|
# define cfsetospeed(tp,s) (((tp)->c_ospeed = (s)), 0)
|
| 172 |
|
|
# define cfsetispeed(tp,s) (((tp)->c_ispeed = (s)), 0)
|
| 173 |
|
|
# define tcdrain(fd) _ioctl (fd, _TCSBRK, 1)
|
| 174 |
|
|
# endif /* _NO_MACROS */
|
| 175 |
|
|
|
| 176 |
|
|
#ifdef __cplusplus
|
| 177 |
|
|
}
|
| 178 |
|
|
#endif
|
| 179 |
|
|
|
| 180 |
|
|
#endif /* _SYS_TERMIOS_H */
|
| 181 |
|
|
|