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

📄 zlg85c30.h

📁 z85c30 DRIVER RUN ON PC104 PC AND VXWORKS SYSTERM.
💻 H
字号:
#ifndef ZLG85C30_H
#define ZLG85C30_H

#include "..\sysparams.h"

#define GetTxBufNByte 		1
#define GetTxBufFreeBytes	2
#define GetRxBufNByte 		3
#define GetRxBufFreeBytes	4


#define ComMaxUnit 14
#define ComMaxData 1600

#define com13_dataport  0x3f8
#define com14_dataport  0x2f8
#define com_dataport  0
#define com_intenable 1
#define com_intflag   2
#define com_lineclt   3
#define com_modemclt  4
#define com_lineflag  5
#define com_modemflag 6
#define com_brlsb     0
#define com_brmsb     1

#define IIR_RDA 		0x04	/* received data available */
#define IIR_THRE		0x02	/* transmit holding register empty */
#define IIR_TIMEOUT 	0x0c	/* char receiv tiemout */
#define RxFIFO_BIT		0x01	
#define TxFIFO_BIT		0x02
#define MCR_DTR 		0x01	/* dtr output */
#define MCR_RTS 		0x02	/* rts output */
#define MCR_OUT1		0x04	/* output #1 */
#define MCR_OUT2		0x08	/* output #2 */
#define MSR_CTS 		0x10	/* complement of cts */
#define MSR_DCD		0x80

#define Flag_Send_Enable 0x01
#define Flag_Rcev_Enable 0x02


#define com2_commandport 0x2d2
#define com2_dataport    0x2d3
#define com1_commandport 0x2d0
#define com1_dataport    0x2d1

#define com4_commandport 0x2d6
#define com4_dataport    0x2d7
#define com3_commandport 0x2d4
#define com3_dataport    0x2d5

#define com6_commandport 0x2da
#define com6_dataport    0x2db
#define com5_commandport 0x2d8
#define com5_dataport    0x2d9

#define com8_commandport 0x2de
#define com8_dataport    0x2df
#define com7_commandport 0x2dc
#define com7_dataport    0x2dd

#define com10_commandport 0x2e2
#define com10_dataport    0x2e3
#define com9_commandport 0x2e0
#define com9_dataport    0x2e1

#define com12_commandport 0x2e6
#define com12_dataport    0x2e7
#define com11_commandport 0x2e4
#define com11_dataport    0x2e5


#define clock_f    7372800

#define intcommand1       0x20
#define intcommand2       0xa0
#define intmask1          0x21
#define intmask2          0xa1

struct PortSetTable
{
	char portName[10];
	int  unit;
	int  commandport;
	int  dataport;
	int  sync_async;/*0:async; 1:sync*/
	//int  dltype;
	unsigned long baudRate;
	int  clockType; /*0:DPLL; 1:Iclock; 2:Oclock;*/
	int  stopBit;
	int  dataBit;
	int  checktype; /*0:None; 1:ODD; 2:EVEN*/
	unsigned char  intLevel;
	int  flag;

	unsigned int  intNum;
	unsigned int  RevByteNum;
	unsigned int  RevFrameNum;
	unsigned int  SendByteNum;
	unsigned int  SendFrameNum;
	unsigned int  RevFrameErrorNum;
	int  open;

	//unsigned char intVectorStatic[ComMaxData];
	//unsigned int  pintVectorStatic;
};
extern struct PortSetTable portconfig[ComMaxUnit];
extern int dataAddr[ComMaxUnit];
extern int commandAddr[ComMaxUnit];
extern int portsending[ComMaxUnit];

extern int Zlg85C30Debugstatus;
extern struct SysCmdFormat_T usrPortParams[ComMaxUnit];
#endif

⌨️ 快捷键说明

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