1*0b46ac44SIlpo Järvinen /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2*0b46ac44SIlpo Järvinen #ifndef __ASM_GENERIC_TERMBITS_COMMON_H 3*0b46ac44SIlpo Järvinen #define __ASM_GENERIC_TERMBITS_COMMON_H 4*0b46ac44SIlpo Järvinen 5*0b46ac44SIlpo Järvinen typedef unsigned char cc_t; 6*0b46ac44SIlpo Järvinen typedef unsigned int speed_t; 7*0b46ac44SIlpo Järvinen 8*0b46ac44SIlpo Järvinen /* c_iflag bits */ 9*0b46ac44SIlpo Järvinen #define IGNBRK 0x001 /* Ignore break condition */ 10*0b46ac44SIlpo Järvinen #define BRKINT 0x002 /* Signal interrupt on break */ 11*0b46ac44SIlpo Järvinen #define IGNPAR 0x004 /* Ignore characters with parity errors */ 12*0b46ac44SIlpo Järvinen #define PARMRK 0x008 /* Mark parity and framing errors */ 13*0b46ac44SIlpo Järvinen #define INPCK 0x010 /* Enable input parity check */ 14*0b46ac44SIlpo Järvinen #define ISTRIP 0x020 /* Strip 8th bit off characters */ 15*0b46ac44SIlpo Järvinen #define INLCR 0x040 /* Map NL to CR on input */ 16*0b46ac44SIlpo Järvinen #define IGNCR 0x080 /* Ignore CR */ 17*0b46ac44SIlpo Järvinen #define ICRNL 0x100 /* Map CR to NL on input */ 18*0b46ac44SIlpo Järvinen #define IXANY 0x800 /* Any character will restart after stop */ 19*0b46ac44SIlpo Järvinen 20*0b46ac44SIlpo Järvinen /* c_oflag bits */ 21*0b46ac44SIlpo Järvinen #define OPOST 0x01 /* Perform output processing */ 22*0b46ac44SIlpo Järvinen #define OCRNL 0x08 23*0b46ac44SIlpo Järvinen #define ONOCR 0x10 24*0b46ac44SIlpo Järvinen #define ONLRET 0x20 25*0b46ac44SIlpo Järvinen #define OFILL 0x40 26*0b46ac44SIlpo Järvinen #define OFDEL 0x80 27*0b46ac44SIlpo Järvinen 28*0b46ac44SIlpo Järvinen /* c_cflag bit meaning */ 29*0b46ac44SIlpo Järvinen /* Common CBAUD rates */ 30*0b46ac44SIlpo Järvinen #define B0 0x00000000 /* hang up */ 31*0b46ac44SIlpo Järvinen #define B50 0x00000001 32*0b46ac44SIlpo Järvinen #define B75 0x00000002 33*0b46ac44SIlpo Järvinen #define B110 0x00000003 34*0b46ac44SIlpo Järvinen #define B134 0x00000004 35*0b46ac44SIlpo Järvinen #define B150 0x00000005 36*0b46ac44SIlpo Järvinen #define B200 0x00000006 37*0b46ac44SIlpo Järvinen #define B300 0x00000007 38*0b46ac44SIlpo Järvinen #define B600 0x00000008 39*0b46ac44SIlpo Järvinen #define B1200 0x00000009 40*0b46ac44SIlpo Järvinen #define B1800 0x0000000a 41*0b46ac44SIlpo Järvinen #define B2400 0x0000000b 42*0b46ac44SIlpo Järvinen #define B4800 0x0000000c 43*0b46ac44SIlpo Järvinen #define B9600 0x0000000d 44*0b46ac44SIlpo Järvinen #define B19200 0x0000000e 45*0b46ac44SIlpo Järvinen #define B38400 0x0000000f 46*0b46ac44SIlpo Järvinen #define EXTA B19200 47*0b46ac44SIlpo Järvinen #define EXTB B38400 48*0b46ac44SIlpo Järvinen 49*0b46ac44SIlpo Järvinen #define CMSPAR 0x40000000 /* mark or space (stick) parity */ 50*0b46ac44SIlpo Järvinen #define CRTSCTS 0x80000000 /* flow control */ 51*0b46ac44SIlpo Järvinen 52*0b46ac44SIlpo Järvinen #define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */ 53*0b46ac44SIlpo Järvinen 54*0b46ac44SIlpo Järvinen /* tcflow() ACTION argument and TCXONC use these */ 55*0b46ac44SIlpo Järvinen #define TCOOFF 0 /* Suspend output */ 56*0b46ac44SIlpo Järvinen #define TCOON 1 /* Restart suspended output */ 57*0b46ac44SIlpo Järvinen #define TCIOFF 2 /* Send a STOP character */ 58*0b46ac44SIlpo Järvinen #define TCION 3 /* Send a START character */ 59*0b46ac44SIlpo Järvinen 60*0b46ac44SIlpo Järvinen /* tcflush() QUEUE_SELECTOR argument and TCFLSH use these */ 61*0b46ac44SIlpo Järvinen #define TCIFLUSH 0 /* Discard data received but not yet read */ 62*0b46ac44SIlpo Järvinen #define TCOFLUSH 1 /* Discard data written but not yet sent */ 63*0b46ac44SIlpo Järvinen #define TCIOFLUSH 2 /* Discard all pending data */ 64*0b46ac44SIlpo Järvinen 65*0b46ac44SIlpo Järvinen #endif /* __ASM_GENERIC_TERMBITS_COMMON_H */ 66