18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
28c2ecf20Sopenharmony_ci#ifndef __ARCH_PARISC_TERMBITS_H__
38c2ecf20Sopenharmony_ci#define __ARCH_PARISC_TERMBITS_H__
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci#include <linux/posix_types.h>
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_citypedef unsigned char	cc_t;
88c2ecf20Sopenharmony_citypedef unsigned int	speed_t;
98c2ecf20Sopenharmony_citypedef unsigned int	tcflag_t;
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci#define NCCS 19
128c2ecf20Sopenharmony_cistruct termios {
138c2ecf20Sopenharmony_ci	tcflag_t c_iflag;		/* input mode flags */
148c2ecf20Sopenharmony_ci	tcflag_t c_oflag;		/* output mode flags */
158c2ecf20Sopenharmony_ci	tcflag_t c_cflag;		/* control mode flags */
168c2ecf20Sopenharmony_ci	tcflag_t c_lflag;		/* local mode flags */
178c2ecf20Sopenharmony_ci	cc_t c_line;			/* line discipline */
188c2ecf20Sopenharmony_ci	cc_t c_cc[NCCS];		/* control characters */
198c2ecf20Sopenharmony_ci};
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_cistruct termios2 {
228c2ecf20Sopenharmony_ci	tcflag_t c_iflag;		/* input mode flags */
238c2ecf20Sopenharmony_ci	tcflag_t c_oflag;		/* output mode flags */
248c2ecf20Sopenharmony_ci	tcflag_t c_cflag;		/* control mode flags */
258c2ecf20Sopenharmony_ci	tcflag_t c_lflag;		/* local mode flags */
268c2ecf20Sopenharmony_ci	cc_t c_line;			/* line discipline */
278c2ecf20Sopenharmony_ci	cc_t c_cc[NCCS];		/* control characters */
288c2ecf20Sopenharmony_ci	speed_t c_ispeed;		/* input speed */
298c2ecf20Sopenharmony_ci	speed_t c_ospeed;		/* output speed */
308c2ecf20Sopenharmony_ci};
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_cistruct ktermios {
338c2ecf20Sopenharmony_ci	tcflag_t c_iflag;		/* input mode flags */
348c2ecf20Sopenharmony_ci	tcflag_t c_oflag;		/* output mode flags */
358c2ecf20Sopenharmony_ci	tcflag_t c_cflag;		/* control mode flags */
368c2ecf20Sopenharmony_ci	tcflag_t c_lflag;		/* local mode flags */
378c2ecf20Sopenharmony_ci	cc_t c_line;			/* line discipline */
388c2ecf20Sopenharmony_ci	cc_t c_cc[NCCS];		/* control characters */
398c2ecf20Sopenharmony_ci	speed_t c_ispeed;		/* input speed */
408c2ecf20Sopenharmony_ci	speed_t c_ospeed;		/* output speed */
418c2ecf20Sopenharmony_ci};
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_ci/* c_cc characters */
448c2ecf20Sopenharmony_ci#define VINTR 0
458c2ecf20Sopenharmony_ci#define VQUIT 1
468c2ecf20Sopenharmony_ci#define VERASE 2
478c2ecf20Sopenharmony_ci#define VKILL 3
488c2ecf20Sopenharmony_ci#define VEOF 4
498c2ecf20Sopenharmony_ci#define VTIME 5
508c2ecf20Sopenharmony_ci#define VMIN 6
518c2ecf20Sopenharmony_ci#define VSWTC 7
528c2ecf20Sopenharmony_ci#define VSTART 8
538c2ecf20Sopenharmony_ci#define VSTOP 9
548c2ecf20Sopenharmony_ci#define VSUSP 10
558c2ecf20Sopenharmony_ci#define VEOL 11
568c2ecf20Sopenharmony_ci#define VREPRINT 12
578c2ecf20Sopenharmony_ci#define VDISCARD 13
588c2ecf20Sopenharmony_ci#define VWERASE 14
598c2ecf20Sopenharmony_ci#define VLNEXT 15
608c2ecf20Sopenharmony_ci#define VEOL2 16
618c2ecf20Sopenharmony_ci
628c2ecf20Sopenharmony_ci
638c2ecf20Sopenharmony_ci/* c_iflag bits */
648c2ecf20Sopenharmony_ci#define IGNBRK	0000001
658c2ecf20Sopenharmony_ci#define BRKINT	0000002
668c2ecf20Sopenharmony_ci#define IGNPAR	0000004
678c2ecf20Sopenharmony_ci#define PARMRK	0000010
688c2ecf20Sopenharmony_ci#define INPCK	0000020
698c2ecf20Sopenharmony_ci#define ISTRIP	0000040
708c2ecf20Sopenharmony_ci#define INLCR	0000100
718c2ecf20Sopenharmony_ci#define IGNCR	0000200
728c2ecf20Sopenharmony_ci#define ICRNL	0000400
738c2ecf20Sopenharmony_ci#define IUCLC	0001000
748c2ecf20Sopenharmony_ci#define IXON	0002000
758c2ecf20Sopenharmony_ci#define IXANY	0004000
768c2ecf20Sopenharmony_ci#define IXOFF	0010000
778c2ecf20Sopenharmony_ci#define IMAXBEL	0040000
788c2ecf20Sopenharmony_ci#define IUTF8	0100000
798c2ecf20Sopenharmony_ci
808c2ecf20Sopenharmony_ci/* c_oflag bits */
818c2ecf20Sopenharmony_ci#define OPOST	0000001
828c2ecf20Sopenharmony_ci#define OLCUC	0000002
838c2ecf20Sopenharmony_ci#define ONLCR	0000004
848c2ecf20Sopenharmony_ci#define OCRNL	0000010
858c2ecf20Sopenharmony_ci#define ONOCR	0000020
868c2ecf20Sopenharmony_ci#define ONLRET	0000040
878c2ecf20Sopenharmony_ci#define OFILL	0000100
888c2ecf20Sopenharmony_ci#define OFDEL	0000200
898c2ecf20Sopenharmony_ci#define NLDLY	0000400
908c2ecf20Sopenharmony_ci#define   NL0	0000000
918c2ecf20Sopenharmony_ci#define   NL1	0000400
928c2ecf20Sopenharmony_ci#define CRDLY	0003000
938c2ecf20Sopenharmony_ci#define   CR0	0000000
948c2ecf20Sopenharmony_ci#define   CR1	0001000
958c2ecf20Sopenharmony_ci#define   CR2	0002000
968c2ecf20Sopenharmony_ci#define   CR3	0003000
978c2ecf20Sopenharmony_ci#define TABDLY	0014000
988c2ecf20Sopenharmony_ci#define   TAB0	0000000
998c2ecf20Sopenharmony_ci#define   TAB1	0004000
1008c2ecf20Sopenharmony_ci#define   TAB2	0010000
1018c2ecf20Sopenharmony_ci#define   TAB3	0014000
1028c2ecf20Sopenharmony_ci#define   XTABS	0014000
1038c2ecf20Sopenharmony_ci#define BSDLY	0020000
1048c2ecf20Sopenharmony_ci#define   BS0	0000000
1058c2ecf20Sopenharmony_ci#define   BS1	0020000
1068c2ecf20Sopenharmony_ci#define VTDLY	0040000
1078c2ecf20Sopenharmony_ci#define   VT0	0000000
1088c2ecf20Sopenharmony_ci#define   VT1	0040000
1098c2ecf20Sopenharmony_ci#define FFDLY	0100000
1108c2ecf20Sopenharmony_ci#define   FF0	0000000
1118c2ecf20Sopenharmony_ci#define   FF1	0100000
1128c2ecf20Sopenharmony_ci
1138c2ecf20Sopenharmony_ci/* c_cflag bit meaning */
1148c2ecf20Sopenharmony_ci#define CBAUD   0010017
1158c2ecf20Sopenharmony_ci#define  B0     0000000         /* hang up */
1168c2ecf20Sopenharmony_ci#define  B50    0000001
1178c2ecf20Sopenharmony_ci#define  B75    0000002
1188c2ecf20Sopenharmony_ci#define  B110   0000003
1198c2ecf20Sopenharmony_ci#define  B134   0000004
1208c2ecf20Sopenharmony_ci#define  B150   0000005
1218c2ecf20Sopenharmony_ci#define  B200   0000006
1228c2ecf20Sopenharmony_ci#define  B300   0000007
1238c2ecf20Sopenharmony_ci#define  B600   0000010
1248c2ecf20Sopenharmony_ci#define  B1200  0000011
1258c2ecf20Sopenharmony_ci#define  B1800  0000012
1268c2ecf20Sopenharmony_ci#define  B2400  0000013
1278c2ecf20Sopenharmony_ci#define  B4800  0000014
1288c2ecf20Sopenharmony_ci#define  B9600  0000015
1298c2ecf20Sopenharmony_ci#define  B19200 0000016
1308c2ecf20Sopenharmony_ci#define  B38400 0000017
1318c2ecf20Sopenharmony_ci#define EXTA B19200
1328c2ecf20Sopenharmony_ci#define EXTB B38400
1338c2ecf20Sopenharmony_ci#define CSIZE   0000060
1348c2ecf20Sopenharmony_ci#define   CS5   0000000
1358c2ecf20Sopenharmony_ci#define   CS6   0000020
1368c2ecf20Sopenharmony_ci#define   CS7   0000040
1378c2ecf20Sopenharmony_ci#define   CS8   0000060
1388c2ecf20Sopenharmony_ci#define CSTOPB  0000100
1398c2ecf20Sopenharmony_ci#define CREAD   0000200
1408c2ecf20Sopenharmony_ci#define PARENB  0000400
1418c2ecf20Sopenharmony_ci#define PARODD  0001000
1428c2ecf20Sopenharmony_ci#define HUPCL   0002000
1438c2ecf20Sopenharmony_ci#define CLOCAL  0004000
1448c2ecf20Sopenharmony_ci#define CBAUDEX 0010000
1458c2ecf20Sopenharmony_ci#define    BOTHER 0010000
1468c2ecf20Sopenharmony_ci#define    B57600 0010001
1478c2ecf20Sopenharmony_ci#define   B115200 0010002
1488c2ecf20Sopenharmony_ci#define   B230400 0010003
1498c2ecf20Sopenharmony_ci#define   B460800 0010004
1508c2ecf20Sopenharmony_ci#define   B500000 0010005
1518c2ecf20Sopenharmony_ci#define   B576000 0010006
1528c2ecf20Sopenharmony_ci#define   B921600 0010007
1538c2ecf20Sopenharmony_ci#define  B1000000 0010010
1548c2ecf20Sopenharmony_ci#define  B1152000 0010011
1558c2ecf20Sopenharmony_ci#define  B1500000 0010012
1568c2ecf20Sopenharmony_ci#define  B2000000 0010013
1578c2ecf20Sopenharmony_ci#define  B2500000 0010014
1588c2ecf20Sopenharmony_ci#define  B3000000 0010015
1598c2ecf20Sopenharmony_ci#define  B3500000 0010016
1608c2ecf20Sopenharmony_ci#define  B4000000 0010017
1618c2ecf20Sopenharmony_ci#define CIBAUD    002003600000		/* input baud rate */
1628c2ecf20Sopenharmony_ci#define CMSPAR    010000000000          /* mark or space (stick) parity */
1638c2ecf20Sopenharmony_ci#define CRTSCTS   020000000000          /* flow control */
1648c2ecf20Sopenharmony_ci
1658c2ecf20Sopenharmony_ci#define IBSHIFT	16		/* Shift from CBAUD to CIBAUD */
1668c2ecf20Sopenharmony_ci
1678c2ecf20Sopenharmony_ci
1688c2ecf20Sopenharmony_ci/* c_lflag bits */
1698c2ecf20Sopenharmony_ci#define ISIG    0000001
1708c2ecf20Sopenharmony_ci#define ICANON  0000002
1718c2ecf20Sopenharmony_ci#define XCASE   0000004
1728c2ecf20Sopenharmony_ci#define ECHO    0000010
1738c2ecf20Sopenharmony_ci#define ECHOE   0000020
1748c2ecf20Sopenharmony_ci#define ECHOK   0000040
1758c2ecf20Sopenharmony_ci#define ECHONL  0000100
1768c2ecf20Sopenharmony_ci#define NOFLSH  0000200
1778c2ecf20Sopenharmony_ci#define TOSTOP  0000400
1788c2ecf20Sopenharmony_ci#define ECHOCTL 0001000
1798c2ecf20Sopenharmony_ci#define ECHOPRT 0002000
1808c2ecf20Sopenharmony_ci#define ECHOKE  0004000
1818c2ecf20Sopenharmony_ci#define FLUSHO  0010000
1828c2ecf20Sopenharmony_ci#define PENDIN  0040000
1838c2ecf20Sopenharmony_ci#define IEXTEN  0100000
1848c2ecf20Sopenharmony_ci#define EXTPROC	0200000
1858c2ecf20Sopenharmony_ci
1868c2ecf20Sopenharmony_ci/* tcflow() and TCXONC use these */
1878c2ecf20Sopenharmony_ci#define	TCOOFF		0
1888c2ecf20Sopenharmony_ci#define	TCOON		1
1898c2ecf20Sopenharmony_ci#define	TCIOFF		2
1908c2ecf20Sopenharmony_ci#define	TCION		3
1918c2ecf20Sopenharmony_ci
1928c2ecf20Sopenharmony_ci/* tcflush() and TCFLSH use these */
1938c2ecf20Sopenharmony_ci#define	TCIFLUSH	0
1948c2ecf20Sopenharmony_ci#define	TCOFLUSH	1
1958c2ecf20Sopenharmony_ci#define	TCIOFLUSH	2
1968c2ecf20Sopenharmony_ci
1978c2ecf20Sopenharmony_ci/* tcsetattr uses these */
1988c2ecf20Sopenharmony_ci#define	TCSANOW		0
1998c2ecf20Sopenharmony_ci#define	TCSADRAIN	1
2008c2ecf20Sopenharmony_ci#define	TCSAFLUSH	2
2018c2ecf20Sopenharmony_ci
2028c2ecf20Sopenharmony_ci#endif
203