📄 diti.h
字号:
/*---------------------------------------------------------------------*//*---------------------------------------------------------------------*//* TermIoctl will perform control functions on the minor device. In *//* most cases these functions are used to change the device's *//* configuration or get the current value of the configuration. *//*---------------------------------------------------------------------*/void TermIoctl (struct ioparms *parms);/*---------------------------------------------------------------------*//* The in_iopb element of the ioparms structure will point to a TermCtl*//* structure: *//*---------------------------------------------------------------------*/typedef struct { unsigned long function; /* function code for the I/O */ /* control call */ void *arg; /* pointer to function dependent */ /* information */}TermCtl;typedef struct { unsigned long ParityErrs; /* number of parity errors */ unsigned long FramingErrs; /* number of framing errors */ unsigned long OverrunErrs; /* number of overrun errors */ unsigned long AutoBaudEnb; /* is auto baud enabled */ } ASYNC_STAT;typedef struct { unsigned long FrameCheckErrs; /* frame check errors */ unsigned long TransmitUnderrunErrs; /* transmit underrun errors */ unsigned long ReceiveOverrunErrs; /* receive overruns errors */ unsigned long InterruptedFrames; /* frames that were stopped */ unsigned long AbortedFrames; /* frames that were aborted */ } SYNC_STAT;/*---------------------------------------------------------------------*//* Termio is the control structure for a channel *//*---------------------------------------------------------------------*/#define NCC 10 struct termio { unsigned short c_iflag; /* input modes */ unsigned short c_oflag; /* output modes */ unsigned short c_cflag; /* control modes */ unsigned short c_lflag; /* line discipline modes */ unsigned char c_cc[NCC]; /* control chars */};/*---------------------------------------------------------------------*//* Control Characters (c_cc) *//*---------------------------------------------------------------------*/#define VERASE 2#define VEOF 4#define VEOL 5#define VMIN 4#define VTIME 5#define VSTART 8#define VSTOP 9#define CEOF 04 /* cntl d */#define CEOL 0#define CSTART 021 /* cntl q */#define CSTOP 023 /* cntl s *//*---------------------------------------------------------------------*//* Input Modes (c_iflag) *//*---------------------------------------------------------------------*/#define IGNBRK 0000001 /* Ignore break condition */#define BRKINT 0000002 /* interrupt on break */#define IPOST 0001700 /* input processing mask */#define INLCR 0000100 /* Map NL to CR on input */#define IGNCR 0000200 /* Ignore CR */#define ICRNL 0000400 /* Map CR to NL on input. */#define IUCLC 0001000 /* Map upper-case to lower-case on input */#define IXON 0002000 /* Enable start/stop output control */#define IXANY 0004000 /* Enable any character to restart output. */#define IXOFF 0010000 /* Enable start/stop input control. */#define IMAXBEL 0020000 /* Echo BEL on input line too long. *//*---------------------------------------------------------------------*//* Output Modes (c_oflag) *//*---------------------------------------------------------------------*/#define OPOST 0000001#define OLCUC 0000002#define ONLCR 0000004#define OCRNL 0000010#define ONOCR 0000020#define ONLRET 0000040#define NLDLY 0000400/*---------------------------------------------------------------------*//* Control Modes (c_cflag) *//*---------------------------------------------------------------------*/#define CBAUD 0000017 #define B0 0 #define B50 1 #define B75 2 #define B110 3 #define B134 4 #define B150 5 #define B200 6 #define B300 7 #define B600 8 #define B1200 9 #define B1800 10 #define B2400 11 #define B4800 12 #define B9600 13 #define B19200 14 #define B38400 15#define CSIZE 0000060 #define CS5 0 #define CS6 0000020 #define CS7 0000040 #define CS8 0000060#define CSTOPB 0000100#define CREAD 0000200#define PARENB 0000400#define PARODD 0001000#define CLOCAL 0004000/*---------------------------------------------------------------------*//* Line Discipline Modes (c_lflag) *//*---------------------------------------------------------------------*/#define ICANON 0000002#define ECHO 0000010#define ECHONL 0000100/*---------------------------------------------------------------------*//* I/O Control Commands *//*---------------------------------------------------------------------*/#define TIOC(x) (x<<8)#define TCGETA TIOC(1) /* same as TCGETS */#define TCSETA TIOC(2) /* same as TCSETS */#define TCSETAW TIOC(3)#define TCSETAF TIOC(4)#define TCSBRK TIOC(5)#define TCXONC TIOC(6) #define TCOOFF 0 /* suspend output */ #define TCOON 1 /* restart suspended output */ #define TCIOFF 2 /* suspend input */ #define TCION 3 /* restart suspended input */#define TCFLSH TIOC(7) #define TCIFLUSH 0 /* flush data received but not read */ #define TCOFLUSH 1 /* flush data written but not transmitted */ #define TCIOFLUSH 2 /* flush both data both input and output queues */#define TCGETS TIOC(13)#define TCSETS TIOC(14)#define TCSETSW TIOC(15)#define TCSETSF TIOC(16)#define TIOCMBIS TIOC(27) /* bis modem bits */#define TIOCMBIC TIOC(28) /* bic modem bits */#define TIOCMGET TIOC(29) /* get all modem bits */#define TIOCMSET TIOC(30) /* get all modem bits */ #define TIOCM_DTR 0x0002 /* data terminal ready */ #define TIOCM_RTS 0x0004 /* request to send */ #define TIOCM_ST 0x0008 /* secondary transmit */ #define TIOCM_SR 0x0010 /* secondary receive */ #define TIOCM_CTS 0x0020 /* clear to send */ #define TIOCM_CAR 0x0040 /* carrier detect */ #define TIOCM_CD TIOCM_CAR #define TIOCM_RNG 0x0080 /* ring */ #define TIOCM_RI TIOCM_RNG #define TIOCM_DSR 0x0100 /* data set ready *//*---------------------------------------------------------------------*//* Extended I/O Controle Functions: *//*---------------------------------------------------------------------*//* TERMGETDEFTERM will copy the current minor number of the default *//* console to the unsigned long pointed to by arg. *//*---------------------------------------------------------------------*/#define TERMGETDEFTERM 0x0000000B/*---------------------------------------------------------------------*//* TERMPUTDEFTERM will change the current value of the default console *//* to the unsigned long pointed to by arg. */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -