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

📄 headc.h

📁 MOXA卡的操作.用语DOS系统下操作多串口卡。经过测试.效果良好
💻 H
字号:
/*	head-c.h	ver 3.20	10/03/1996
 *	Definitions for MOXA Serial I/O Controller ioctrl
 */

/*	BAUD rate setting	*/
#define B50			0x00
#define B75			0x01
#define B110		0x02
#define B134		0x03
#define B150		0x04
#define B300		0x05
#define B600		0x06
#define B1200		0x07
#define B1800		0x08
#define B2400		0x09
#define B4800		0x0A
#define B7200		0x0B
#define B9600		0x0C
#define B19200		0x0D
#define B38400		0x0E
#define B57600		0x0F
#define B115200 	0x10
#define B230400 	0x11
#define B460800 	0x12
#define B921600 	0x13

/*	MODE setting		*/
#define BIT_5		0x00			/* Word length define	*/
#define BIT_6		0x01
#define BIT_7		0x02
#define BIT_8		0x03

#define STOP_1		0x00			/* Stop bits define	*/
#define STOP_2		0x04

#define P_EVEN		0x18			/* Parity define	*/
#define P_ODD		0x08
#define P_SPC		0x38
#define P_MRK		0x28
#define P_NONE		0x00

/*	MODEM CONTROL setting	*/
#define C_DTR		0x01
#define C_RTS		0x02

/*	MODEM LINE STATUS	*/
#define S_CTS		0x01
#define S_DSR		0x02
#define S_RI		0x04
#define S_CD		0x08

/******************************************************/
/*	     For Borland C++ version 2.00	      */
/******************************************************/

#ifdef __cplusplus
extern "C" {
#endif

int	cdecl	sio_reset(void);
int	cdecl	sio_getports(int *port_no_array, int array_size);
int	cdecl	sio_loopback(int port, char *buf, int len);
int	cdecl	sio_ioctl(int port, int baud, int mode);
int	cdecl	sio_getch(int port);
int	cdecl	sio_linput(int port, char *buf, int len, int term);
int	cdecl	sio_read(int port, char *buf, int len);
int	cdecl	sio_putch(int port, int term);
int	cdecl	sio_putb(int port, char *buf, int len);
int	cdecl	sio_write(int port, char *buf, int len);
int	cdecl	sio_flush(int port, int func);
long	cdecl	sio_iqueue(int port);
long	cdecl	sio_ifree(int port);
long	cdecl	sio_oqueue(int port);
long	cdecl	sio_ofree(int port);
int	cdecl	sio_lstatus(int port);
int	cdecl	sio_lctrl(int port, int mode);
int	cdecl	sio_term_irq(int port, void (interrupt far *func)(), char code);
int	cdecl	sio_cnt_irq(int port, void (interrupt far *func)(), int count);
int	cdecl	sio_modem_irq(int port, void (interrupt far *func)());
int	cdecl	sio_break_irq(int port, void (interrupt far *func)());
int	cdecl	sio_break(int port, int time);
int	cdecl	sio_brk_cnt(int port);
int	cdecl	sio_flowctrl(int port, int mode);
int	cdecl	sio_Tx_hold(int port);
int	cdecl	sio_disableTx(int port);
int	cdecl	sio_enableTx(int port);
int	cdecl	sio_close(int port);
int	cdecl	sio_open(int port);
long	cdecl	sio_getbaud(int port);
int	cdecl	sio_getmode(int port);
int	cdecl	sio_getflow(int port);
int	cdecl	sio_timeout(int time_tic);
int	cdecl	sio_linput_t(int port, char *buf, int len, int term);
int	cdecl	sio_putb_t(int port, char *buf, int len);
int	cdecl	sio_overflow(int port);
int	cdecl	sio_overlap(int port, int mode);
int	cdecl	sio_cardno(int drvname);
int	cdecl	sio_id(int drvname, int card);
int	cdecl	sio_bank(int drvname, int card);
int	cdecl	sio_linked(int drvname, int card);
int	cdecl	sio_view(int port, char *ibuf, int len);
int	cdecl	sio_disableIRQ(int port, int intrr_type);
int	cdecl	sio_enableIRQ(int port, int intrr_type);
int	cdecl	sio_DTR(int port, int mode);
int	cdecl	sio_RTS(int port, int mode);
int	cdecl	sio_baud(int port, long speed);
int	cdecl	sio_ignore_errdata(int port, int mode);
int	cdecl	sio_data_status(int port);
int	cdecl	sio_putb_x(int port, char *buf, int len, int delay);
int	cdecl	sio_disableRx(int port);
int	cdecl	sio_enableRx(int port);
int	cdecl	sio_getACs(int drvname, int card, int *serial_no_array,
			   int array_size);
int	cdecl	sio_ACstate(int drvname, int serial);
long	cdecl	sio_ACdiag(int drvname, int serial);

#ifdef __cplusplus
}
#endif

⌨️ 快捷键说明

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