zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

termbits-common.h (2213B) - Raw


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