1#ifndef __LINUX_TERMIOS_H__
2#define __LINUX_TERMIOS_H__
47#define TIOCM_DTR 0x002
48#define TIOCM_RTS 0x004
51#define TIOCM_CTS 0x020
52#define TIOCM_CAR 0x040
53#define TIOCM_RNG 0x080
54#define TIOCM_DSR 0x100
55#define TIOCM_CD TIOCM_CAR
56#define TIOCM_RI TIOCM_RNG
57#define TIOCM_OUT1 0x2000
58#define TIOCM_OUT2 0x4000
59#define TIOCM_LOOP 0x8000
61#include <linux/kernel.h>
118#define TABDLY 0x01800
135#define CBAUD 0x0000100f
136#define CSIZE 0x00000030
137#define CS5 0x00000000
138#define CS6 0x00000010
139#define CS7 0x00000020
140#define CS8 0x00000030
141#define CSTOPB 0x00000040
142#define CREAD 0x00000080
143#define PARENB 0x00000100
144#define PARODD 0x00000200
145#define HUPCL 0x00000400
146#define CLOCAL 0x00000800
147#define CBAUDEX 0x00001000
148#define BOTHER 0x00001000
149#define B57600 0x00001001
150#define B115200 0x00001002
151#define B230400 0x00001003
152#define B460800 0x00001004
153#define B500000 0x00001005
154#define B576000 0x00001006
155#define B921600 0x00001007
156#define B1000000 0x00001008
157#define B1152000 0x00001009
158#define B1500000 0x0000100a
159#define B2000000 0x0000100b
160#define B2500000 0x0000100c
161#define B3000000 0x0000100d
162#define B3500000 0x0000100e
163#define B4000000 0x0000100f
164#define CIBAUD 0x100f0000
165#define ADDRB 0x20000000
166#define CMSPAR 0x40000000
167#define CRTSCTS 0x80000000
173#define B50 0x00000001
174#define B75 0x00000002
175#define B110 0x00000003
176#define B134 0x00000004
177#define B150 0x00000005
178#define B200 0x00000006
179#define B300 0x00000007
180#define B600 0x00000008
181#define B1200 0x00000009
182#define B1800 0x0000000a
183#define B2400 0x0000000b
184#define B4800 0x0000000c
185#define B9600 0x0000000d
186#define B19200 0x0000000e
187#define B38400 0x0000000f
193#define ICANON 0x00002
198#define ECHONL 0x00040
199#define NOFLSH 0x00080
200#define TOSTOP 0x00100
201#define ECHOCTL 0x00200
202#define ECHOPRT 0x00400
203#define ECHOKE 0x00800
204#define FLUSHO 0x01000
205#define PENDIN 0x04000
206#define IEXTEN 0x08000
207#define EXTPROC 0x10000
306static inline speed_t __dcl_cbaud_to_rate(
unsigned int cbaud)
308 static const speed_t std_rate[16] = {
309 0, 50, 75, 110, 134, 150, 200, 300,
310 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400
312 static const speed_t high_rate[16] = {
314 0, 57600, 115200, 230400, 460800, 500000, 576000, 921600,
315 1000000, 1152000, 1500000, 2000000, 2500000, 3000000,
320 return high_rate[cbaud & 0x0f];
321 return std_rate[cbaud & 0x0f];
330 return __dcl_cbaud_to_rate(cbaud);
344 return tty_termios_baud_rate(
termios);
347 return __dcl_cbaud_to_rate(ibaud);
350static inline unsigned int __dcl_rate_to_cbaud(
speed_t rate)
356 case 110:
return B110;
357 case 134:
return B134;
358 case 150:
return B150;
359 case 200:
return B200;
360 case 300:
return B300;
361 case 600:
return B600;
362 case 1200:
return B1200;
363 case 1800:
return B1800;
364 case 2400:
return B2400;
365 case 4800:
return B4800;
366 case 9600:
return B9600;
367 case 19200:
return B19200;
368 case 38400:
return B38400;
369 case 57600:
return B57600;
394static inline void tty_termios_encode_baud_rate(
struct ktermios*
termios,
399 ((
unsigned int)__dcl_rate_to_cbaud(ibaud) <<
IBSHIFT);
#define CBAUDEX
Definition termios.h:147
#define B4000000
Definition termios.h:163
unsigned char cc_t
Definition termios.h:78
#define B1800
Definition termios.h:182
#define B3500000
Definition termios.h:162
#define B2500000
Definition termios.h:160
unsigned int speed_t
Definition termios.h:79
#define NCCS
Definition termios.h:228
#define B576000
Definition termios.h:154
#define BOTHER
Definition termios.h:148
#define B1000000
Definition termios.h:156
#define B1200
Definition termios.h:181
#define B4800
Definition termios.h:184
#define IBSHIFT
Definition termios.h:168
#define B600
Definition termios.h:180
#define B57600
Definition termios.h:149
#define B300
Definition termios.h:179
#define CBAUD
Definition termios.h:135
#define B500000
Definition termios.h:153
#define B460800
Definition termios.h:152
#define NCC
Definition termios.h:288
#define B75
Definition termios.h:174
#define B150
Definition termios.h:177
#define B1152000
Definition termios.h:157
#define B134
Definition termios.h:176
void tty_termios_copy_hw(struct ktermios *new, const struct ktermios *old)
#define B0
Definition termios.h:172
#define B200
Definition termios.h:178
#define B1500000
Definition termios.h:158
#define B230400
Definition termios.h:151
#define B38400
Definition termios.h:187
#define CIBAUD
Definition termios.h:164
#define B50
Definition termios.h:173
struct ktermios tty_std_termios
#define B110
Definition termios.h:175
#define B2000000
Definition termios.h:159
unsigned int tcflag_t
Definition termios.h:226
#define B3000000
Definition termios.h:161
#define B9600
Definition termios.h:185
#define B921600
Definition termios.h:155
#define B19200
Definition termios.h:186
#define B115200
Definition termios.h:150
#define B2400
Definition termios.h:183
speed_t c_ospeed
Definition termios.h:258
tcflag_t c_iflag
Definition termios.h:251
speed_t c_ispeed
Definition termios.h:257
tcflag_t c_cflag
Definition termios.h:253
tcflag_t c_oflag
Definition termios.h:252
cc_t c_line
Definition termios.h:255
tcflag_t c_lflag
Definition termios.h:254
cc_t c_cc[NCCS]
Definition termios.h:256
unsigned short c_cflag
Definition termios.h:292
unsigned short c_oflag
Definition termios.h:291
unsigned char c_line
Definition termios.h:294
unsigned short c_iflag
Definition termios.h:290
unsigned short c_lflag
Definition termios.h:293
unsigned char c_cc[NCC]
Definition termios.h:295
tcflag_t c_oflag
Definition termios.h:241
cc_t c_cc[NCCS]
Definition termios.h:245
speed_t c_ispeed
Definition termios.h:246
tcflag_t c_cflag
Definition termios.h:242
speed_t c_ospeed
Definition termios.h:247
tcflag_t c_lflag
Definition termios.h:243
cc_t c_line
Definition termios.h:244
tcflag_t c_iflag
Definition termios.h:240
tcflag_t c_cflag
Definition termios.h:233
cc_t c_cc[NCCS]
Definition termios.h:236
tcflag_t c_iflag
Definition termios.h:231
tcflag_t c_lflag
Definition termios.h:234
tcflag_t c_oflag
Definition termios.h:232
cc_t c_line
Definition termios.h:235
unsigned short ws_row
Definition termios.h:282
unsigned short ws_col
Definition termios.h:283
unsigned short ws_xpixel
Definition termios.h:284
unsigned short ws_ypixel
Definition termios.h:285