Path: blob/master/arch/sparc/include/uapi/asm/termbits.h
26495 views
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */1#ifndef _UAPI_SPARC_TERMBITS_H2#define _UAPI_SPARC_TERMBITS_H34#include <asm-generic/termbits-common.h>56#if defined(__sparc__) && defined(__arch64__)7typedef unsigned int tcflag_t;8#else9typedef unsigned long tcflag_t;10#endif1112#define NCCS 1713struct termios {14tcflag_t c_iflag; /* input mode flags */15tcflag_t c_oflag; /* output mode flags */16tcflag_t c_cflag; /* control mode flags */17tcflag_t c_lflag; /* local mode flags */18cc_t c_line; /* line discipline */19#ifndef __KERNEL__20cc_t c_cc[NCCS]; /* control characters */21#else22cc_t c_cc[NCCS+2]; /* kernel needs 2 more to hold vmin/vtime */23#define SIZEOF_USER_TERMIOS sizeof (struct termios) - (2*sizeof (cc_t))24#endif25};2627struct termios2 {28tcflag_t c_iflag; /* input mode flags */29tcflag_t c_oflag; /* output mode flags */30tcflag_t c_cflag; /* control mode flags */31tcflag_t c_lflag; /* local mode flags */32cc_t c_line; /* line discipline */33cc_t c_cc[NCCS+2]; /* control characters */34speed_t c_ispeed; /* input speed */35speed_t c_ospeed; /* output speed */36};3738struct ktermios {39tcflag_t c_iflag; /* input mode flags */40tcflag_t c_oflag; /* output mode flags */41tcflag_t c_cflag; /* control mode flags */42tcflag_t c_lflag; /* local mode flags */43cc_t c_line; /* line discipline */44cc_t c_cc[NCCS+2]; /* control characters */45speed_t c_ispeed; /* input speed */46speed_t c_ospeed; /* output speed */47};4849/* c_cc characters */50#define VINTR 051#define VQUIT 152#define VERASE 253#define VKILL 354#define VEOF 455#define VEOL 556#define VEOL2 657#define VSWTC 758#define VSTART 859#define VSTOP 96061#define VSUSP 1062#define VDSUSP 11 /* SunOS POSIX nicety I do believe... */63#define VREPRINT 1264#define VDISCARD 1365#define VWERASE 1466#define VLNEXT 156768/* Kernel keeps vmin/vtime separated, user apps assume vmin/vtime is69* shared with eof/eol70*/71#ifndef __KERNEL__72#define VMIN VEOF73#define VTIME VEOL74#endif7576/* c_iflag bits */77#define IUCLC 0x020078#define IXON 0x040079#define IXOFF 0x100080#define IMAXBEL 0x200081#define IUTF8 0x40008283/* c_oflag bits */84#define OLCUC 0x0000285#define ONLCR 0x0000486#define NLDLY 0x0010087#define NL0 0x0000088#define NL1 0x0010089#define CRDLY 0x0060090#define CR0 0x0000091#define CR1 0x0020092#define CR2 0x0040093#define CR3 0x0060094#define TABDLY 0x0180095#define TAB0 0x0000096#define TAB1 0x0080097#define TAB2 0x0100098#define TAB3 0x0180099#define XTABS 0x01800100#define BSDLY 0x02000101#define BS0 0x00000102#define BS1 0x02000103#define VTDLY 0x04000104#define VT0 0x00000105#define VT1 0x04000106#define FFDLY 0x08000107#define FF0 0x00000108#define FF1 0x08000109#define PAGEOUT 0x10000 /* SUNOS specific */110#define WRAP 0x20000 /* SUNOS specific */111112/* c_cflag bit meaning */113#define CBAUD 0x0000100f114#define CSIZE 0x00000030115#define CS5 0x00000000116#define CS6 0x00000010117#define CS7 0x00000020118#define CS8 0x00000030119#define CSTOPB 0x00000040120#define CREAD 0x00000080121#define PARENB 0x00000100122#define PARODD 0x00000200123#define HUPCL 0x00000400124#define CLOCAL 0x00000800125#define CBAUDEX 0x00001000126/* We'll never see these speeds with the Zilogs, but for completeness... */127#define BOTHER 0x00001000128#define B57600 0x00001001129#define B115200 0x00001002130#define B230400 0x00001003131#define B460800 0x00001004132/* This is what we can do with the Zilogs. */133#define B76800 0x00001005134/* This is what we can do with the SAB82532. */135#define B153600 0x00001006136#define B307200 0x00001007137#define B614400 0x00001008138#define B921600 0x00001009139/* And these are the rest... */140#define B500000 0x0000100a141#define B576000 0x0000100b142#define B1000000 0x0000100c143#define B1152000 0x0000100d144#define B1500000 0x0000100e145#define B2000000 0x0000100f146/* These have totally bogus values and nobody uses them147so far. Later on we'd have to use say 0x10000x and148adjust CBAUD constant and drivers accordingly.149#define B2500000 0x00001010150#define B3000000 0x00001011151#define B3500000 0x00001012152#define B4000000 0x00001013 */153#define CIBAUD 0x100f0000 /* input baud rate (not used) */154155/* c_lflag bits */156#define ISIG 0x00000001157#define ICANON 0x00000002158#define XCASE 0x00000004159#define ECHO 0x00000008160#define ECHOE 0x00000010161#define ECHOK 0x00000020162#define ECHONL 0x00000040163#define NOFLSH 0x00000080164#define TOSTOP 0x00000100165#define ECHOCTL 0x00000200166#define ECHOPRT 0x00000400167#define ECHOKE 0x00000800168#define DEFECHO 0x00001000 /* SUNOS thing, what is it? */169#define FLUSHO 0x00002000170#define PENDIN 0x00004000171#define IEXTEN 0x00008000172#define EXTPROC 0x00010000173174/* modem lines */175#define TIOCM_LE 0x001176#define TIOCM_DTR 0x002177#define TIOCM_RTS 0x004178#define TIOCM_ST 0x008179#define TIOCM_SR 0x010180#define TIOCM_CTS 0x020181#define TIOCM_CAR 0x040182#define TIOCM_RNG 0x080183#define TIOCM_DSR 0x100184#define TIOCM_CD TIOCM_CAR185#define TIOCM_RI TIOCM_RNG186#define TIOCM_OUT1 0x2000187#define TIOCM_OUT2 0x4000188#define TIOCM_LOOP 0x8000189190/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */191#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */192193/* tcsetattr uses these */194#define TCSANOW 0195#define TCSADRAIN 1196#define TCSAFLUSH 2197198#endif /* _UAPI_SPARC_TERMBITS_H */199200201