10b46ac44SIlpo Järvinen /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 20b46ac44SIlpo Järvinen #ifndef __ASM_GENERIC_TERMBITS_COMMON_H 30b46ac44SIlpo Järvinen #define __ASM_GENERIC_TERMBITS_COMMON_H 40b46ac44SIlpo Järvinen 50b46ac44SIlpo Järvinen typedef unsigned char cc_t; 60b46ac44SIlpo Järvinen typedef unsigned int speed_t; 70b46ac44SIlpo Järvinen 80b46ac44SIlpo Järvinen /* c_iflag bits */ 90b46ac44SIlpo Järvinen #define IGNBRK 0x001 /* Ignore break condition */ 100b46ac44SIlpo Järvinen #define BRKINT 0x002 /* Signal interrupt on break */ 110b46ac44SIlpo Järvinen #define IGNPAR 0x004 /* Ignore characters with parity errors */ 120b46ac44SIlpo Järvinen #define PARMRK 0x008 /* Mark parity and framing errors */ 130b46ac44SIlpo Järvinen #define INPCK 0x010 /* Enable input parity check */ 140b46ac44SIlpo Järvinen #define ISTRIP 0x020 /* Strip 8th bit off characters */ 150b46ac44SIlpo Järvinen #define INLCR 0x040 /* Map NL to CR on input */ 160b46ac44SIlpo Järvinen #define IGNCR 0x080 /* Ignore CR */ 170b46ac44SIlpo Järvinen #define ICRNL 0x100 /* Map CR to NL on input */ 180b46ac44SIlpo Järvinen #define IXANY 0x800 /* Any character will restart after stop */ 190b46ac44SIlpo Järvinen 200b46ac44SIlpo Järvinen /* c_oflag bits */ 210b46ac44SIlpo Järvinen #define OPOST 0x01 /* Perform output processing */ 220b46ac44SIlpo Järvinen #define OCRNL 0x08 230b46ac44SIlpo Järvinen #define ONOCR 0x10 240b46ac44SIlpo Järvinen #define ONLRET 0x20 250b46ac44SIlpo Järvinen #define OFILL 0x40 260b46ac44SIlpo Järvinen #define OFDEL 0x80 270b46ac44SIlpo Järvinen 280b46ac44SIlpo Järvinen /* c_cflag bit meaning */ 290b46ac44SIlpo Järvinen /* Common CBAUD rates */ 300b46ac44SIlpo Järvinen #define B0 0x00000000 /* hang up */ 310b46ac44SIlpo Järvinen #define B50 0x00000001 320b46ac44SIlpo Järvinen #define B75 0x00000002 330b46ac44SIlpo Järvinen #define B110 0x00000003 340b46ac44SIlpo Järvinen #define B134 0x00000004 350b46ac44SIlpo Järvinen #define B150 0x00000005 360b46ac44SIlpo Järvinen #define B200 0x00000006 370b46ac44SIlpo Järvinen #define B300 0x00000007 380b46ac44SIlpo Järvinen #define B600 0x00000008 390b46ac44SIlpo Järvinen #define B1200 0x00000009 400b46ac44SIlpo Järvinen #define B1800 0x0000000a 410b46ac44SIlpo Järvinen #define B2400 0x0000000b 420b46ac44SIlpo Järvinen #define B4800 0x0000000c 430b46ac44SIlpo Järvinen #define B9600 0x0000000d 440b46ac44SIlpo Järvinen #define B19200 0x0000000e 450b46ac44SIlpo Järvinen #define B38400 0x0000000f 460b46ac44SIlpo Järvinen #define EXTA B19200 470b46ac44SIlpo Järvinen #define EXTB B38400 480b46ac44SIlpo Järvinen 49*4f768e94SIlpo Järvinen #define ADDRB 0x20000000 /* address bit */ 500b46ac44SIlpo Järvinen #define CMSPAR 0x40000000 /* mark or space (stick) parity */ 510b46ac44SIlpo Järvinen #define CRTSCTS 0x80000000 /* flow control */ 520b46ac44SIlpo Järvinen 530b46ac44SIlpo Järvinen #define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */ 540b46ac44SIlpo Järvinen 550b46ac44SIlpo Järvinen /* tcflow() ACTION argument and TCXONC use these */ 560b46ac44SIlpo Järvinen #define TCOOFF 0 /* Suspend output */ 570b46ac44SIlpo Järvinen #define TCOON 1 /* Restart suspended output */ 580b46ac44SIlpo Järvinen #define TCIOFF 2 /* Send a STOP character */ 590b46ac44SIlpo Järvinen #define TCION 3 /* Send a START character */ 600b46ac44SIlpo Järvinen 610b46ac44SIlpo Järvinen /* tcflush() QUEUE_SELECTOR argument and TCFLSH use these */ 620b46ac44SIlpo Järvinen #define TCIFLUSH 0 /* Discard data received but not yet read */ 630b46ac44SIlpo Järvinen #define TCOFLUSH 1 /* Discard data written but not yet sent */ 640b46ac44SIlpo Järvinen #define TCIOFLUSH 2 /* Discard all pending data */ 650b46ac44SIlpo Järvinen 660b46ac44SIlpo Järvinen #endif /* __ASM_GENERIC_TERMBITS_COMMON_H */ 67