192 lines
3.4 KiB
Python
192 lines
3.4 KiB
Python
# Generated by h2py from /usr/include/termios.h
|
|
VEOF = 0
|
|
VEOL = 1
|
|
VEOL2 = 2
|
|
VERASE = 3
|
|
VWERASE = 4
|
|
VKILL = 5
|
|
VREPRINT = 6
|
|
VINTR = 8
|
|
VQUIT = 9
|
|
VSUSP = 10
|
|
VDSUSP = 11
|
|
VSTART = 12
|
|
VSTOP = 13
|
|
VLNEXT = 14
|
|
VDISCARD = 15
|
|
VMIN = 16
|
|
VTIME = 17
|
|
VSTATUS = 18
|
|
NCCS = 20
|
|
IGNBRK = 0x00000001
|
|
BRKINT = 0x00000002
|
|
IGNPAR = 0x00000004
|
|
PARMRK = 0x00000008
|
|
INPCK = 0x00000010
|
|
ISTRIP = 0x00000020
|
|
INLCR = 0x00000040
|
|
IGNCR = 0x00000080
|
|
ICRNL = 0x00000100
|
|
IXON = 0x00000200
|
|
IXOFF = 0x00000400
|
|
IXANY = 0x00000800
|
|
IMAXBEL = 0x00002000
|
|
OPOST = 0x00000001
|
|
ONLCR = 0x00000002
|
|
OXTABS = 0x00000004
|
|
ONOEOT = 0x00000008
|
|
CIGNORE = 0x00000001
|
|
CSIZE = 0x00000300
|
|
CS5 = 0x00000000
|
|
CS6 = 0x00000100
|
|
CS7 = 0x00000200
|
|
CS8 = 0x00000300
|
|
CSTOPB = 0x00000400
|
|
CREAD = 0x00000800
|
|
PARENB = 0x00001000
|
|
PARODD = 0x00002000
|
|
HUPCL = 0x00004000
|
|
CLOCAL = 0x00008000
|
|
CRTSCTS = 0x00010000
|
|
CRTS_IFLOW = CRTSCTS
|
|
CCTS_OFLOW = CRTSCTS
|
|
MDMBUF = 0x00100000
|
|
CHWFLOW = (MDMBUF|CRTSCTS)
|
|
ECHOKE = 0x00000001
|
|
ECHOE = 0x00000002
|
|
ECHOK = 0x00000004
|
|
ECHO = 0x00000008
|
|
ECHONL = 0x00000010
|
|
ECHOPRT = 0x00000020
|
|
ECHOCTL = 0x00000040
|
|
ISIG = 0x00000080
|
|
ICANON = 0x00000100
|
|
ALTWERASE = 0x00000200
|
|
IEXTEN = 0x00000400
|
|
EXTPROC = 0x00000800
|
|
TOSTOP = 0x00400000
|
|
FLUSHO = 0x00800000
|
|
NOKERNINFO = 0x02000000
|
|
PENDIN = 0x20000000
|
|
NOFLSH = 0x80000000
|
|
TCSANOW = 0
|
|
TCSADRAIN = 1
|
|
TCSAFLUSH = 2
|
|
TCSASOFT = 0x10
|
|
B0 = 0
|
|
B50 = 50
|
|
B75 = 75
|
|
B110 = 110
|
|
B134 = 134
|
|
B150 = 150
|
|
B200 = 200
|
|
B300 = 300
|
|
B600 = 600
|
|
B1200 = 1200
|
|
B1800 = 1800
|
|
B2400 = 2400
|
|
B4800 = 4800
|
|
B9600 = 9600
|
|
B19200 = 19200
|
|
B38400 = 38400
|
|
B7200 = 7200
|
|
B14400 = 14400
|
|
B28800 = 28800
|
|
B57600 = 57600
|
|
B76800 = 76800
|
|
B115200 = 115200
|
|
B230400 = 230400
|
|
EXTA = 19200
|
|
EXTB = 38400
|
|
TCIFLUSH = 1
|
|
TCOFLUSH = 2
|
|
TCIOFLUSH = 3
|
|
TCOOFF = 1
|
|
TCOON = 2
|
|
TCIOFF = 3
|
|
TCION = 4
|
|
|
|
# Included from sys/cdefs.h
|
|
|
|
# Included from machine/cdefs.h
|
|
def __P(protos): return protos
|
|
|
|
def __STRING(x): return #x
|
|
|
|
def __P(protos): return ()
|
|
|
|
def __STRING(x): return "x"
|
|
|
|
def __attribute__(x): return
|
|
|
|
def __kprintf_attribute__(a): return __attribute__(a)
|
|
|
|
|
|
# Included from sys/ttycom.h
|
|
|
|
# Included from sys/ioccom.h
|
|
IOCPARM_MASK = 0x1fff
|
|
def IOCPARM_LEN(x): return (((x) >> 16) & IOCPARM_MASK)
|
|
|
|
def IOCBASECMD(x): return ((x) & ~(IOCPARM_MASK << 16))
|
|
|
|
def IOCGROUP(x): return (((x) >> 8) & 0xff)
|
|
|
|
TIOCM_LE = 0001
|
|
TIOCM_DTR = 0002
|
|
TIOCM_RTS = 0004
|
|
TIOCM_ST = 0010
|
|
TIOCM_SR = 0020
|
|
TIOCM_CTS = 0040
|
|
TIOCM_CAR = 0100
|
|
TIOCM_CD = TIOCM_CAR
|
|
TIOCM_RNG = 0200
|
|
TIOCM_RI = TIOCM_RNG
|
|
TIOCM_DSR = 0400
|
|
TIOCPKT_DATA = 0x00
|
|
TIOCPKT_FLUSHREAD = 0x01
|
|
TIOCPKT_FLUSHWRITE = 0x02
|
|
TIOCPKT_STOP = 0x04
|
|
TIOCPKT_START = 0x08
|
|
TIOCPKT_NOSTOP = 0x10
|
|
TIOCPKT_DOSTOP = 0x20
|
|
TIOCPKT_IOCTL = 0x40
|
|
def UIOCCMD(n): return _IO(ord('u'), n)
|
|
|
|
TIOCFLAG_SOFTCAR = 0x01
|
|
TIOCFLAG_CLOCAL = 0x02
|
|
TIOCFLAG_CRTSCTS = 0x04
|
|
TIOCFLAG_MDMBUF = 0x08
|
|
TTYDISC = 0
|
|
TABLDISC = 3
|
|
SLIPDISC = 4
|
|
PPPDISC = 5
|
|
STRIPDISC = 6
|
|
|
|
# Included from sys/ttydefaults.h
|
|
TTYDEF_IFLAG = (BRKINT | ICRNL | IMAXBEL | IXON | IXANY)
|
|
TTYDEF_OFLAG = (OPOST | ONLCR | OXTABS)
|
|
TTYDEF_LFLAG = (ECHO | ICANON | ISIG | IEXTEN | ECHOE|ECHOKE|ECHOCTL)
|
|
TTYDEF_CFLAG = (CREAD | CS8 | HUPCL)
|
|
TTYDEF_SPEED = (B9600)
|
|
def CTRL(x): return (x&037)
|
|
|
|
CEOF = CTRL(ord('d'))
|
|
CERASE = 0177
|
|
CINTR = CTRL(ord('c'))
|
|
CKILL = CTRL(ord('u'))
|
|
CMIN = 1
|
|
CQUIT = 034
|
|
CSUSP = CTRL(ord('z'))
|
|
CTIME = 0
|
|
CDSUSP = CTRL(ord('y'))
|
|
CSTART = CTRL(ord('q'))
|
|
CSTOP = CTRL(ord('s'))
|
|
CLNEXT = CTRL(ord('v'))
|
|
CDISCARD = CTRL(ord('o'))
|
|
CWERASE = CTRL(ord('w'))
|
|
CREPRINT = CTRL(ord('r'))
|
|
CEOT = CEOF
|
|
CRPRNT = CREPRINT
|
|
CFLUSH = CDISCARD
|