⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 i2cmd.h

📁 h内核
💻 H
📖 第 1 页 / 共 2 页
字号:
#define CMD_RI_REP   (cmdSyntaxPtr)(ct24) // Enable  RI  reporting#define CMD_RI_NREP  (cmdSyntaxPtr)(ct25) // Disable RI  reporting// Enable break reporting and select style//#define CMD_BRK_REP(arg) \	(((cmdSyntaxPtr)(ct26))->cmd[1] = (arg),(cmdSyntaxPtr)(ct26))#define CBK_STAT     0x00  // Report breaks as a status (exception,irq)#define CBK_NULL     0x01  // Report breaks as a good null#define CBK_STAT_SEQ 0x02  // Report breaks as a status AND as in-band character                           //  sequence FFh, 01h, 10h#define CBK_SEQ      0x03  // Report breaks as the in-band 						   //sequence FFh, 01h, 10h ONLY.#define CBK_FLSH     0x04  // if this bit set also flush input data#define CBK_POSIX    0x08  // if this bit set report as FF,0,0 sequence#define CBK_SINGLE   0x10  // if this bit set with CBK_SEQ or CBK_STAT_SEQ						   //then reports single null instead of triple#define CMD_BRK_NREP (cmdSyntaxPtr)(ct27) // Disable break reporting// Specify maximum block size for received data//#define CMD_MAX_BLOCK(arg) \	(((cmdSyntaxPtr)(ct28))->cmd[1] = (arg),(cmdSyntaxPtr)(ct28))// -- COMMAND 29 is reserved --#define CMD_CTSFL_ENAB  (cmdSyntaxPtr)(ct30) // Enable  CTS flow control#define CMD_CTSFL_DSAB  (cmdSyntaxPtr)(ct31) // Disable CTS flow control#define CMD_RTSFL_ENAB  (cmdSyntaxPtr)(ct32) // Enable  RTS flow control#define CMD_RTSFL_DSAB  (cmdSyntaxPtr)(ct33) // Disable RTS flow control// Specify istrip option//#define CMD_ISTRIP_OPT(arg) \	(((cmdSyntaxPtr)(ct34))->cmd[1] = (arg),(cmdSyntaxPtr)(ct34))#define CIS_NOSTRIP  0  // Strip characters to character size#define CIS_STRIP    1  // Strip any 8-bit characters to 7 bits// Send a break of arg milliseconds//#define CMD_SEND_BRK(arg) \	(((cmdSyntaxPtr)(ct35))->cmd[1] = (arg),(cmdSyntaxPtr)(ct35))// Set error reporting mode//#define CMD_SET_ERROR(arg) \	(((cmdSyntaxPtr)(ct36))->cmd[1] = (arg),(cmdSyntaxPtr)(ct36))#define CSE_ESTAT 0  // Report error in a status packet#define CSE_NOREP 1  // Treat character as though it were good#define CSE_DROP  2  // Discard the character#define CSE_NULL  3  // Replace with a null#define CSE_MARK  4  // Replace with a 3-character sequence (as Unix)#define  CMD_SET_REPLACEMENT(arg,ch)   \			(((cmdSyntaxPtr)(ct36a))->cmd[1] = (arg), \			(((cmdSyntaxPtr)(ct36a))->cmd[2] = (ch),  \			(cmdSyntaxPtr)(ct36a))#define CSE_REPLACE  0x8	// Replace the errored character with the							// replacement character defined here#define CSE_STAT_REPLACE   0x18	// Replace the errored character with the								// replacement character defined here AND								// report the error as a status packet (as in								// CSE_ESTAT).// COMMAND 37, to send flow control packets, is handled only by low-level// library code in response to data movement and shouldn't ever be sent by the// user code. See i2pack.h and the body of i2lib.c for details.// Enable on-board post-processing, using options given in oflag argument.// Formerly, this command was automatically preceded by a CMD_OPOST_OFF command// because the loadware does not permit sending back-to-back CMD_OPOST_ON// commands without an intervening CMD_OPOST_OFF. BUT, WE LEARN 18 MAY 92, that// CMD_OPOST_ON and CMD_OPOST_OFF must each be at the end of a packet (or in a// solo packet). This means the caller must specify separately CMD_OPOST_OFF,// CMD_OPOST_ON(parm) when he calls i2QueueCommands(). That function will ensure// each gets a separate packet. Extra CMD_OPOST_OFF's are always ok.//#define CMD_OPOST_ON(oflag)   \	(*(USHORT *)(((cmdSyntaxPtr)(ct39))->cmd[1]) = (oflag), \		(cmdSyntaxPtr)(ct39))#define CMD_OPOST_OFF   (cmdSyntaxPtr)(ct40) // Disable on-board post-proc#define CMD_RESUME   (cmdSyntaxPtr)(ct41)	// Resume: behave as though an XON											// were received;// Set Transmit baud rate (see command 7 for arguments)//#define CMD_SETBAUD_TX(arg) \	(((cmdSyntaxPtr)(ct42))->cmd[1] = (arg),(cmdSyntaxPtr)(ct42))// Set Receive baud rate (see command 7 for arguments)//#define CMD_SETBAUD_RX(arg) \	(((cmdSyntaxPtr)(ct43))->cmd[1] = (arg),(cmdSyntaxPtr)(ct43))// Request interrupt from board each arg milliseconds. Interrupt will specify// "received data", even though there may be no data present. If arg == 0,// disables any such interrupts.//#define CMD_PING_REQ(arg) \	(((cmdSyntaxPtr)(ct44))->cmd[1] = (arg),(cmdSyntaxPtr)(ct44))#define CMD_HOT_ENAB (cmdSyntaxPtr)(ct45) // Enable Hot-key checking#define CMD_HOT_DSAB (cmdSyntaxPtr)(ct46) // Disable Hot-key checking// COMMAND 47: Send Protocol info via Unix flags:// iflag = Unix tty t_iflag// cflag = Unix tty t_cflag// lflag = Unix tty t_lflag// See System V Unix/Xenix documentation for the meanings of the bit fields// within these flags//#define CMD_UNIX_FLAGS(iflag,cflag,lflag) i2cmdUnixFlags(iflag,cflag,lflag)#define CMD_DSRFL_ENAB  (cmdSyntaxPtr)(ct48) // Enable  DSR receiver ctrl#define CMD_DSRFL_DSAB  (cmdSyntaxPtr)(ct49) // Disable DSR receiver ctrl#define CMD_DTRFL_ENAB  (cmdSyntaxPtr)(ct50) // Enable  DTR flow control#define CMD_DTRFL_DSAB  (cmdSyntaxPtr)(ct51) // Disable DTR flow control#define CMD_BAUD_RESET  (cmdSyntaxPtr)(ct52) // Reset baudrate table// COMMAND 54: Define custom rate #1// rate = (short) 1/10 of the desired baud rate//#define CMD_BAUD_DEF1(rate) i2cmdBaudDef(1,rate)// COMMAND 55: Define custom rate #2// rate = (short) 1/10 of the desired baud rate//#define CMD_BAUD_DEF2(rate) i2cmdBaudDef(2,rate)// Pause arg hundredths of seconds. (Note, this is NOT milliseconds.)//#define CMD_PAUSE(arg) \	(((cmdSyntaxPtr)(ct56))->cmd[1] = (arg),(cmdSyntaxPtr)(ct56))#define CMD_SUSPEND     (cmdSyntaxPtr)(ct57) // Suspend output#define CMD_UNSUSPEND   (cmdSyntaxPtr)(ct58) // Un-Suspend output// Set parity-checking options//#define CMD_PARCHK(arg) \	(((cmdSyntaxPtr)(ct59))->cmd[1] = (arg),(cmdSyntaxPtr)(ct59))#define CPK_ENAB  0     // Enable parity checking on input#define CPK_DSAB  1     // Disable parity checking on input#define CMD_BMARK_REQ   (cmdSyntaxPtr)(ct60) // Bookmark request// Enable/Disable internal loopback mode//#define CMD_INLOOP(arg) \	(((cmdSyntaxPtr)(ct61))->cmd[1] = (arg),(cmdSyntaxPtr)(ct61))#define CIN_DISABLE  0  // Normal operation (default)#define CIN_ENABLE   1  // Internal (local) loopback#define CIN_REMOTE   2  // Remote loopback// Specify timeout for hotkeys: Delay will be (arg x 10) milliseconds, arg == 0// --> no timeout: wait forever.//#define CMD_HOT_TIME(arg) \	(((cmdSyntaxPtr)(ct62))->cmd[1] = (arg),(cmdSyntaxPtr)(ct62))// Define (outgoing) xon for receive flow control//#define CMD_DEF_OXON(arg) \	(((cmdSyntaxPtr)(ct63))->cmd[1] = (arg),(cmdSyntaxPtr)(ct63))// Define (outgoing) xoff for receiver flow control//#define CMD_DEF_OXOFF(arg) \	(((cmdSyntaxPtr)(ct64))->cmd[1] = (arg),(cmdSyntaxPtr)(ct64))// Enable/Disable RTS on transmit (1/2 duplex-style)//#define CMD_RTS_XMIT(arg) \	(((cmdSyntaxPtr)(ct65))->cmd[1] = (arg),(cmdSyntaxPtr)(ct65))#define CHD_DISABLE  0#define CHD_ENABLE   1// Set high-water-mark level (debugging use only)//#define CMD_SETHIGHWAT(arg) \	(((cmdSyntaxPtr)(ct66))->cmd[1] = (arg),(cmdSyntaxPtr)(ct66))// Start flushing tagged data (tag = 0-14)//#define CMD_START_SELFL(tag) \	(((cmdSyntaxPtr)(ct67))->cmd[1] = (tag),(cmdSyntaxPtr)(ct67))// End flushing tagged data (tag = 0-14)//#define CMD_END_SELFL(tag) \	(((cmdSyntaxPtr)(ct68))->cmd[1] = (tag),(cmdSyntaxPtr)(ct68))#define CMD_HWFLOW_OFF  (cmdSyntaxPtr)(ct69) // Disable HW TX flow control#define CMD_ODSRFL_ENAB (cmdSyntaxPtr)(ct70) // Enable DSR output f/c#define CMD_ODSRFL_DSAB (cmdSyntaxPtr)(ct71) // Disable DSR output f/c#define CMD_ODCDFL_ENAB (cmdSyntaxPtr)(ct72) // Enable DCD output f/c#define CMD_ODCDFL_DSAB (cmdSyntaxPtr)(ct73) // Disable DCD output f/c// Set transmit interrupt load level. Count should be an even value 2-12//#define CMD_LOADLEVEL(count) \	(((cmdSyntaxPtr)(ct74))->cmd[1] = (count),(cmdSyntaxPtr)(ct74))// If reporting DSS changes, map to character sequence FFh, 2, MSR//#define CMD_STATDATA(arg) \	(((cmdSyntaxPtr)(ct75))->cmd[1] = (arg),(cmdSyntaxPtr)(ct75))#define CSTD_DISABLE// Report DSS changes as status packets only (default)#define CSTD_ENABLE	// Report DSS changes as in-band data sequence as well as					// by status packet.#define CMD_BREAK_ON    (cmdSyntaxPtr)(ct76)// Set break and stop xmit#define CMD_BREAK_OFF   (cmdSyntaxPtr)(ct77)// End break and restart xmit#define CMD_GETFC       (cmdSyntaxPtr)(ct78)// Request for flow control packet											// from board.// Transmit this character immediately//#define CMD_XMIT_NOW(ch) \	(((cmdSyntaxPtr)(ct79))->cmd[1] = (ch),(cmdSyntaxPtr)(ct79))// Set baud rate via "divisor latch"//#define CMD_DIVISOR_LATCH(which,value) \			(((cmdSyntaxPtr)(ct80))->cmd[1] = (which), \			*(USHORT *)(((cmdSyntaxPtr)(ct80))->cmd[2]) = (value), \			(cmdSyntaxPtr)(ct80))#define CDL_RX 1	// Set receiver rate#define CDL_TX 2	// Set transmit rate					// (CDL_TX | CDL_RX) Set both rates// Request for special diagnostic status pkt from the board.//#define CMD_GET_STATUS (cmdSyntaxPtr)(ct81)// Request time-stamped transmit character count packet.//#define CMD_GET_TXCNT  (cmdSyntaxPtr)(ct82)// Request time-stamped receive character count packet.//#define CMD_GET_RXCNT  (cmdSyntaxPtr)(ct83)// Request for box/board I.D. packet.#define CMD_GET_BOXIDS (cmdSyntaxPtr)(ct84)// Enable or disable multiple channels according to bit-mapped ushorts box 1-4//#define CMD_ENAB_MULT(enable, box1, box2, box3, box4)    \			(((cmdSytaxPtr)(ct85))->cmd[1] = (enable),            \			*(USHORT *)(((cmdSyntaxPtr)(ct85))->cmd[2]) = (box1), \			*(USHORT *)(((cmdSyntaxPtr)(ct85))->cmd[4]) = (box2), \			*(USHORT *)(((cmdSyntaxPtr)(ct85))->cmd[6]) = (box3), \			*(USHORT *)(((cmdSyntaxPtr)(ct85))->cmd[8]) = (box4), \			(cmdSyntaxPtr)(ct85))#define CEM_DISABLE  0#define CEM_ENABLE   1// Enable or disable receiver or receiver interrupts (default both enabled)//#define CMD_RCV_ENABLE(ch) \	(((cmdSyntaxPtr)(ct86))->cmd[1] = (ch),(cmdSyntaxPtr)(ct86))#define CRE_OFF      0  // Disable the receiver#define CRE_ON       1  // Enable the receiver#define CRE_INTOFF   2  // Disable receiver interrupts (to loadware)#define CRE_INTON    3  // Enable receiver interrupts (to loadware)// Starts up a hardware test process, which runs transparently, and sends a// STAT_HWFAIL packet in case a hardware failure is detected.//#define CMD_HW_TEST  (cmdSyntaxPtr)(ct87)// Change receiver threshold and timeout value:// Defaults: timeout = 20mS// threshold count = 8 when DTRflow not in use,// threshold count = 5 when DTRflow in use.//#define CMD_RCV_THRESHOLD(count,ms) \			(((cmdSyntaxPtr)(ct88))->cmd[1] = (count), \			((cmdSyntaxPtr)(ct88))->cmd[2] = (ms), \			(cmdSyntaxPtr)(ct88))// Makes the loadware report DSS signals for this channel immediately.//#define CMD_DSS_NOW (cmdSyntaxPtr)(ct89)	// Set the receive silo parameters // 	timeout is ms idle wait until delivery       (~VTIME)// 	threshold is max characters cause interrupt  (~VMIN)//#define CMD_SET_SILO(timeout,threshold) \			(((cmdSyntaxPtr)(ct90))->cmd[1] = (timeout), \			((cmdSyntaxPtr)(ct90))->cmd[2]  = (threshold), \			(cmdSyntaxPtr)(ct90))// Set timed break in decisecond (1/10s)//#define CMD_LBREAK(ds) \	(((cmdSyntaxPtr)(ct91))->cmd[1] = (ds),(cmdSyntaxPtr)(ct66))#endif // I2CMD_H

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -