Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
0002 #ifndef __ASM_GENERIC_TERMBITS_COMMON_H
0003 #define __ASM_GENERIC_TERMBITS_COMMON_H
0004 
0005 typedef unsigned char   cc_t;
0006 typedef unsigned int    speed_t;
0007 
0008 /* c_iflag bits */
0009 #define IGNBRK  0x001           /* Ignore break condition */
0010 #define BRKINT  0x002           /* Signal interrupt on break */
0011 #define IGNPAR  0x004           /* Ignore characters with parity errors */
0012 #define PARMRK  0x008           /* Mark parity and framing errors */
0013 #define INPCK   0x010           /* Enable input parity check */
0014 #define ISTRIP  0x020           /* Strip 8th bit off characters */
0015 #define INLCR   0x040           /* Map NL to CR on input */
0016 #define IGNCR   0x080           /* Ignore CR */
0017 #define ICRNL   0x100           /* Map CR to NL on input */
0018 #define IXANY   0x800           /* Any character will restart after stop */
0019 
0020 /* c_oflag bits */
0021 #define OPOST   0x01            /* Perform output processing */
0022 #define OCRNL   0x08
0023 #define ONOCR   0x10
0024 #define ONLRET  0x20
0025 #define OFILL   0x40
0026 #define OFDEL   0x80
0027 
0028 /* c_cflag bit meaning */
0029 /* Common CBAUD rates */
0030 #define     B0      0x00000000  /* hang up */
0031 #define    B50      0x00000001
0032 #define    B75      0x00000002
0033 #define   B110      0x00000003
0034 #define   B134      0x00000004
0035 #define   B150      0x00000005
0036 #define   B200      0x00000006
0037 #define   B300      0x00000007
0038 #define   B600      0x00000008
0039 #define  B1200      0x00000009
0040 #define  B1800      0x0000000a
0041 #define  B2400      0x0000000b
0042 #define  B4800      0x0000000c
0043 #define  B9600      0x0000000d
0044 #define B19200      0x0000000e
0045 #define B38400      0x0000000f
0046 #define EXTA        B19200
0047 #define EXTB        B38400
0048 
0049 #define ADDRB       0x20000000  /* address bit */
0050 #define CMSPAR      0x40000000  /* mark or space (stick) parity */
0051 #define CRTSCTS     0x80000000  /* flow control */
0052 
0053 #define IBSHIFT     16      /* Shift from CBAUD to CIBAUD */
0054 
0055 /* tcflow() ACTION argument and TCXONC use these */
0056 #define TCOOFF      0       /* Suspend output */
0057 #define TCOON       1       /* Restart suspended output */
0058 #define TCIOFF      2       /* Send a STOP character */
0059 #define TCION       3       /* Send a START character */
0060 
0061 /* tcflush() QUEUE_SELECTOR argument and TCFLSH use these */
0062 #define TCIFLUSH    0       /* Discard data received but not yet read */
0063 #define TCOFLUSH    1       /* Discard data written but not yet sent */
0064 #define TCIOFLUSH   2       /* Discard all pending data */
0065 
0066 #endif /* __ASM_GENERIC_TERMBITS_COMMON_H */