1 /* Glibc termios struct and supporting bits
3 * For whatever reason, OSs/glibc don't have a shared interface for this. Linux
4 * has it's own (different) termios interface. We'll just use glibc's interface
5 * so that we can be interoperable/compatibile.
7 * This all is from sysdeps/ros/bits/termios.h. Check that out for the original
8 * CR statement. I'm fairly certain you can't CR this sort of stuff.
10 * Differences include removing some ifdefs and things we'll never use. You can
11 * tell this is compatibility crap that I didn't write because it uses octal.
14 #ifndef ROS_KERN_TERMIOS_H
15 #define ROS_KERN_TERMIOS_H
17 typedef unsigned char cc_t;
18 typedef unsigned int speed_t;
19 typedef unsigned int tcflag_t;
24 tcflag_t c_iflag; /* input mode flags */
25 tcflag_t c_oflag; /* output mode flags */
26 tcflag_t c_cflag; /* control mode flags */
27 tcflag_t c_lflag; /* local mode flags */
28 cc_t c_line; /* line discipline */
29 cc_t c_cc[NCCS]; /* control characters */
30 /* these last two might not be supported by all glibc builds. search for
31 * _HAVE_STRUCT_TERMIOS_C_ISPEED and friends. */
32 speed_t c_ispeed; /* input speed */
33 speed_t c_ospeed; /* output speed */
56 #define IGNBRK 0000001
57 #define BRKINT 0000002
58 #define IGNPAR 0000004
59 #define PARMRK 0000010
61 #define ISTRIP 0000040
69 #define IMAXBEL 0020000
78 #define ONLRET 0000040
89 #define TABDLY 0014000
101 #define VTDLY 0040000
105 #define XTABS 0014000
107 /* c_cflag bit meaning */
108 #define CBAUD 0010017
109 #define B0 0000000 /* hang up */
118 #define B1200 0000011
119 #define B1800 0000012
120 #define B2400 0000013
121 #define B4800 0000014
122 #define B9600 0000015
123 #define B19200 0000016
124 #define B38400 0000017
127 #define CSIZE 0000060
132 #define CSTOPB 0000100
133 #define CREAD 0000200
134 #define PARENB 0000400
135 #define PARODD 0001000
136 #define HUPCL 0002000
137 #define CLOCAL 0004000
138 #define CBAUDEX 0010000
139 #define B57600 0010001
140 #define B115200 0010002
141 #define B230400 0010003
142 #define B460800 0010004
143 #define B500000 0010005
144 #define B576000 0010006
145 #define B921600 0010007
146 #define B1000000 0010010
147 #define B1152000 0010011
148 #define B1500000 0010012
149 #define B2000000 0010013
150 #define B2500000 0010014
151 #define B3000000 0010015
152 #define B3500000 0010016
153 #define B4000000 0010017
154 #define __MAX_BAUD B4000000
155 #define CIBAUD 002003600000 /* input baud rate (not used) */
156 #define CMSPAR 010000000000 /* mark or space (stick) parity */
157 #define CRTSCTS 020000000000 /* flow control */
161 #define ICANON 0000002
162 #define XCASE 0000004
164 #define ECHOE 0000020
165 #define ECHOK 0000040
166 #define ECHONL 0000100
167 #define NOFLSH 0000200
168 #define TOSTOP 0000400
169 #define ECHOCTL 0001000
170 #define ECHOPRT 0002000
171 #define ECHOKE 0004000
172 #define FLUSHO 0010000
173 #define PENDIN 0040000
174 #define IEXTEN 0100000
176 /* tcflow() and TCXONC use these */
182 /* tcflush() and TCFLSH use these */
187 /* tcsetattr uses these */
192 #endif /* ROS_KERN_TERMIOS_H */