150 lines · c
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */2#ifndef __ASM_GENERIC_TERMBITS_H3#define __ASM_GENERIC_TERMBITS_H4 5#include <asm-generic/termbits-common.h>6 7typedef unsigned int tcflag_t;8 9#define NCCS 1910struct termios {11 tcflag_t c_iflag; /* input mode flags */12 tcflag_t c_oflag; /* output mode flags */13 tcflag_t c_cflag; /* control mode flags */14 tcflag_t c_lflag; /* local mode flags */15 cc_t c_line; /* line discipline */16 cc_t c_cc[NCCS]; /* control characters */17};18 19struct termios2 {20 tcflag_t c_iflag; /* input mode flags */21 tcflag_t c_oflag; /* output mode flags */22 tcflag_t c_cflag; /* control mode flags */23 tcflag_t c_lflag; /* local mode flags */24 cc_t c_line; /* line discipline */25 cc_t c_cc[NCCS]; /* control characters */26 speed_t c_ispeed; /* input speed */27 speed_t c_ospeed; /* output speed */28};29 30struct ktermios {31 tcflag_t c_iflag; /* input mode flags */32 tcflag_t c_oflag; /* output mode flags */33 tcflag_t c_cflag; /* control mode flags */34 tcflag_t c_lflag; /* local mode flags */35 cc_t c_line; /* line discipline */36 cc_t c_cc[NCCS]; /* control characters */37 speed_t c_ispeed; /* input speed */38 speed_t c_ospeed; /* output speed */39};40 41/* c_cc characters */42#define VINTR 043#define VQUIT 144#define VERASE 245#define VKILL 346#define VEOF 447#define VTIME 548#define VMIN 649#define VSWTC 750#define VSTART 851#define VSTOP 952#define VSUSP 1053#define VEOL 1154#define VREPRINT 1255#define VDISCARD 1356#define VWERASE 1457#define VLNEXT 1558#define VEOL2 1659 60/* c_iflag bits */61#define IUCLC 0x020062#define IXON 0x040063#define IXOFF 0x100064#define IMAXBEL 0x200065#define IUTF8 0x400066 67/* c_oflag bits */68#define OLCUC 0x0000269#define ONLCR 0x0000470#define NLDLY 0x0010071#define NL0 0x0000072#define NL1 0x0010073#define CRDLY 0x0060074#define CR0 0x0000075#define CR1 0x0020076#define CR2 0x0040077#define CR3 0x0060078#define TABDLY 0x0180079#define TAB0 0x0000080#define TAB1 0x0080081#define TAB2 0x0100082#define TAB3 0x0180083#define XTABS 0x0180084#define BSDLY 0x0200085#define BS0 0x0000086#define BS1 0x0200087#define VTDLY 0x0400088#define VT0 0x0000089#define VT1 0x0400090#define FFDLY 0x0800091#define FF0 0x0000092#define FF1 0x0800093 94/* c_cflag bit meaning */95#define CBAUD 0x0000100f96#define CSIZE 0x0000003097#define CS5 0x0000000098#define CS6 0x0000001099#define CS7 0x00000020100#define CS8 0x00000030101#define CSTOPB 0x00000040102#define CREAD 0x00000080103#define PARENB 0x00000100104#define PARODD 0x00000200105#define HUPCL 0x00000400106#define CLOCAL 0x00000800107#define CBAUDEX 0x00001000108#define BOTHER 0x00001000109#define B57600 0x00001001110#define B115200 0x00001002111#define B230400 0x00001003112#define B460800 0x00001004113#define B500000 0x00001005114#define B576000 0x00001006115#define B921600 0x00001007116#define B1000000 0x00001008117#define B1152000 0x00001009118#define B1500000 0x0000100a119#define B2000000 0x0000100b120#define B2500000 0x0000100c121#define B3000000 0x0000100d122#define B3500000 0x0000100e123#define B4000000 0x0000100f124#define CIBAUD 0x100f0000 /* input baud rate */125 126/* c_lflag bits */127#define ISIG 0x00001128#define ICANON 0x00002129#define XCASE 0x00004130#define ECHO 0x00008131#define ECHOE 0x00010132#define ECHOK 0x00020133#define ECHONL 0x00040134#define NOFLSH 0x00080135#define TOSTOP 0x00100136#define ECHOCTL 0x00200137#define ECHOPRT 0x00400138#define ECHOKE 0x00800139#define FLUSHO 0x01000140#define PENDIN 0x04000141#define IEXTEN 0x08000142#define EXTPROC 0x10000143 144/* tcsetattr uses these */145#define TCSANOW 0146#define TCSADRAIN 1147#define TCSAFLUSH 2148 149#endif /* __ASM_GENERIC_TERMBITS_H */150