Path: blob/master/arch/mips/include/uapi/asm/termbits.h
26495 views
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */1/*2* This file is subject to the terms and conditions of the GNU General Public3* License. See the file "COPYING" in the main directory of this archive4* for more details.5*6* Copyright (C) 1995, 96, 99, 2001, 06 Ralf Baechle7* Copyright (C) 1999 Silicon Graphics, Inc.8* Copyright (C) 2001 MIPS Technologies, Inc.9*/10#ifndef _ASM_TERMBITS_H11#define _ASM_TERMBITS_H1213#include <asm-generic/termbits-common.h>1415typedef unsigned int tcflag_t;1617/*18* The ABI says nothing about NCC but seems to use NCCS as19* replacement for it in struct termio20*/21#define NCCS 2322struct termios {23tcflag_t c_iflag; /* input mode flags */24tcflag_t c_oflag; /* output mode flags */25tcflag_t c_cflag; /* control mode flags */26tcflag_t c_lflag; /* local mode flags */27cc_t c_line; /* line discipline */28cc_t c_cc[NCCS]; /* control characters */29};3031struct termios2 {32tcflag_t c_iflag; /* input mode flags */33tcflag_t c_oflag; /* output mode flags */34tcflag_t c_cflag; /* control mode flags */35tcflag_t c_lflag; /* local mode flags */36cc_t c_line; /* line discipline */37cc_t c_cc[NCCS]; /* control characters */38speed_t c_ispeed; /* input speed */39speed_t c_ospeed; /* output speed */40};4142struct ktermios {43tcflag_t c_iflag; /* input mode flags */44tcflag_t c_oflag; /* output mode flags */45tcflag_t c_cflag; /* control mode flags */46tcflag_t c_lflag; /* local mode flags */47cc_t c_line; /* line discipline */48cc_t c_cc[NCCS]; /* control characters */49speed_t c_ispeed; /* input speed */50speed_t c_ospeed; /* output speed */51};5253/* c_cc characters */54#define VINTR 0 /* Interrupt character [ISIG] */55#define VQUIT 1 /* Quit character [ISIG] */56#define VERASE 2 /* Erase character [ICANON] */57#define VKILL 3 /* Kill-line character [ICANON] */58#define VMIN 4 /* Minimum number of bytes read at once [!ICANON] */59#define VTIME 5 /* Time-out value (tenths of a second) [!ICANON] */60#define VEOL2 6 /* Second EOL character [ICANON] */61#define VSWTC 7 /* ??? */62#define VSWTCH VSWTC63#define VSTART 8 /* Start (X-ON) character [IXON, IXOFF] */64#define VSTOP 9 /* Stop (X-OFF) character [IXON, IXOFF] */65#define VSUSP 10 /* Suspend character [ISIG] */66#if 067/*68* VDSUSP is not supported69*/70#define VDSUSP 11 /* Delayed suspend character [ISIG] */71#endif72#define VREPRINT 12 /* Reprint-line character [ICANON] */73#define VDISCARD 13 /* Discard character [IEXTEN] */74#define VWERASE 14 /* Word-erase character [ICANON] */75#define VLNEXT 15 /* Literal-next character [IEXTEN] */76#define VEOF 16 /* End-of-file character [ICANON] */77#define VEOL 17 /* End-of-line character [ICANON] */7879/* c_iflag bits */80#define IUCLC 0x0200 /* Map upper case to lower case on input */81#define IXON 0x0400 /* Enable start/stop output control */82#define IXOFF 0x1000 /* Enable start/stop input control */83#define IMAXBEL 0x2000 /* Ring bell when input queue is full */84#define IUTF8 0x4000 /* Input is UTF-8 */8586/* c_oflag bits */87#define OLCUC 0x00002 /* Map lower case to upper case on output */88#define ONLCR 0x00004 /* Map NL to CR-NL on output */89#define NLDLY 0x0010090#define NL0 0x0000091#define NL1 0x0010092#define CRDLY 0x0060093#define CR0 0x0000094#define CR1 0x0020095#define CR2 0x0040096#define CR3 0x0060097#define TABDLY 0x0180098#define TAB0 0x0000099#define TAB1 0x00800100#define TAB2 0x01000101#define TAB3 0x01800102#define XTABS 0x01800103#define BSDLY 0x02000104#define BS0 0x00000105#define BS1 0x02000106#define VTDLY 0x04000107#define VT0 0x00000108#define VT1 0x04000109#define FFDLY 0x08000110#define FF0 0x00000111#define FF1 0x08000112/*113#define PAGEOUT ???114#define WRAP ???115*/116117/* c_cflag bit meaning */118#define CBAUD 0x0000100f119#define CSIZE 0x00000030 /* Number of bits per byte (mask) */120#define CS5 0x00000000 /* 5 bits per byte */121#define CS6 0x00000010 /* 6 bits per byte */122#define CS7 0x00000020 /* 7 bits per byte */123#define CS8 0x00000030 /* 8 bits per byte */124#define CSTOPB 0x00000040 /* Two stop bits instead of one */125#define CREAD 0x00000080 /* Enable receiver */126#define PARENB 0x00000100 /* Parity enable */127#define PARODD 0x00000200 /* Odd parity instead of even */128#define HUPCL 0x00000400 /* Hang up on last close */129#define CLOCAL 0x00000800 /* Ignore modem status lines */130#define CBAUDEX 0x00001000131#define BOTHER 0x00001000132#define B57600 0x00001001133#define B115200 0x00001002134#define B230400 0x00001003135#define B460800 0x00001004136#define B500000 0x00001005137#define B576000 0x00001006138#define B921600 0x00001007139#define B1000000 0x00001008140#define B1152000 0x00001009141#define B1500000 0x0000100a142#define B2000000 0x0000100b143#define B2500000 0x0000100c144#define B3000000 0x0000100d145#define B3500000 0x0000100e146#define B4000000 0x0000100f147#define CIBAUD 0x100f0000 /* input baud rate */148149/* c_lflag bits */150#define ISIG 0x00001 /* Enable signals */151#define ICANON 0x00002 /* Do erase and kill processing */152#define XCASE 0x00004153#define ECHO 0x00008 /* Enable echo */154#define ECHOE 0x00010 /* Visual erase for ERASE */155#define ECHOK 0x00020 /* Echo NL after KILL */156#define ECHONL 0x00040 /* Echo NL even if ECHO is off */157#define NOFLSH 0x00080 /* Disable flush after interrupt */158#define IEXTEN 0x00100 /* Enable DISCARD and LNEXT */159#define ECHOCTL 0x00200 /* Echo control characters as ^X */160#define ECHOPRT 0x00400 /* Hardcopy visual erase */161#define ECHOKE 0x00800 /* Visual erase for KILL */162#define FLUSHO 0x02000163#define PENDIN 0x04000 /* Retype pending input (state) */164#define TOSTOP 0x08000 /* Send SIGTTOU for background output */165#define ITOSTOP TOSTOP166#define EXTPROC 0x10000 /* External processing on pty */167168/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */169#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */170171/* tcsetattr uses these */172#define TCSANOW TCSETS /* Change immediately */173#define TCSADRAIN TCSETSW /* Change when pending output is written */174#define TCSAFLUSH TCSETSF /* Flush pending input before changing */175176#endif /* _ASM_TERMBITS_H */177178179