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

📄 m68302.h

📁 IXP425的BSP代码
💻 H
📖 第 1 页 / 共 2 页
字号:
#define UART_SCCE_BRK 		0x10	/* break character received */#define UART_SCCE_IDL 		0x20	/* idle sequence status changed */#define UART_SCCE_CD  		0x40	/* carrier detect status changed */#define UART_SCCE_CTS 		0x80	/* clear to send status changed *//* UART Protocol - Receive Buffer Descriptor */#define UART_RX_BD_CD		0x0001	/* carrier detect loss during rx */#define UART_RX_BD_OV		0x0002	/* receiver overrun */#define UART_RX_BD_PR		0x0008	/* parity error */#define UART_RX_BD_FR		0x0010	/* framing error */#define UART_RX_BD_BR		0x0020	/* break received */#define UART_RX_BD_ID		0x0100	/* buf closed on reception of IDLES */#define UART_RX_BD_UADDR1	0x0200	/* matched UADDR1 (UADDR2 otherwise) */#define UART_RX_BD_ADDR		0x0400	/* buffer contained address */#define UART_RX_BD_CNT		0x0800	/* control character in last byte */#define UART_RX_BD_INT		0x1000	/* interrupt will be generated */#define UART_RX_BD_WRAP		0x2000	/* wrap back to first BD */#define UART_RX_BD_EXT		0x4000	/* buffer in external memory */#define UART_RX_BD_EMPTY	0x8000	/* buffer is empty (available to CP) *//* UART Protocol - Transmit Buffer Descriptor */#define UART_TX_BD_CT		0x0001	/* cts was lost during tx */#define UART_TX_BD_PREAMBLE	0x0200	/* enable preamble */#define UART_TX_BD_ADDR		0x0400	/* buffer contained address char */#define UART_TX_BD_CTSR		0x0800	/* normal cts error reporting */#define UART_TX_BD_INT		0x1000	/* interrupt will be generated */#define UART_TX_BD_WRAP		0x2000	/* wrap back to first BD */#define UART_TX_BD_EXT		0x4000	/* buffer in external memory */#define UART_TX_BD_READY	0x8000	/* buffer is being sent (don't touch) *//* HDLC Protocol - SCC protocol specific parameters */typedef struct		/* PROT_HDLC */    {    UINT16	rcrcLow;		/* temporary receive crc low */    UINT16	rcrcHigh;		/* temporary receive crc high */    UINT16	cMaskLow;		/* constant (0xf0b8:16b; 0xdebb:32b) */    UINT16	cMaskHigh;		/* constant (0xf0b8:16b; 0x20e3:32b) */    UINT16	tCrcLow;		/* temporary transmit crc low */    UINT16	tCrcHigh;		/* temporary transmit crc high */    UINT16	disfc;			/* discard frame counter */    UINT16	crcec;			/* crc error counter */    UINT16	abtsc;			/* abort sequence counter */    UINT16	nmarc;			/* nonmatching adrs received counter */    UINT16	retrc;			/* frame retransmission counter */    UINT16	mflr;			/* max frame length register */    UINT16	maxCnt;			/* max length counter */    UINT16	hmask;			/* user-defined frame address mask */    UINT16	haddr1;			/* user-defined frame address */    UINT16	haddr2;			/* user-defined frame address */    UINT16	haddr3;			/* user-defined frame address */    UINT16	haddr4;			/* user-defined frame address */    } PROT_HDLC;/* HDLC Protocol - SCC Mode Register */#define HDLC_SCM_HDLC		0x0000	/* hdlc mode */#define HDLC_SCM_ASYNC		0x0001	/* asynchronous mode (uart/ddcmp) */#define HDLC_SCM_SYNC		0x0002	/* synchronous mode (ddcmp/v.110) */#define HDLC_SCM_BISYNC		0x0003	/* bisync/promiscuous mode */#define HDLC_SCM_ENT		0x0004	/* enable transmitter */#define HDLC_SCM_ENR		0x0008	/* enable receiver */#define HDLC_SCM_LOOPBACK	0x0010	/* transmitter hooked to receiver */#define HDLC_SCM_ECHO		0x0020	/* transmitter echoes received chars */#define HDLC_SCM_MANUAL		0x0030	/* cts/cd under software control */#define HDLC_SCM_NRZI		0x0040	/* nrzi tx encoding (nrz otherwise) */#define HDLC_SCM_FLG		0x0080	/* send flags between frames */#define HDLC_SCM_RTE		0x0100	/* retransmit enable */#define HDLC_SCM_FSE		0x0400	/* flag sharing enable */#define HDLC_SCM_C32		0x0800	/* 32 bit CCITT crc *//* HDLC Protocol - SCC Event Register */#define HDLC_SCCE_RXB 		0x01	/* incomplete buffer received */#define HDLC_SCCE_TXB 		0x02	/* buffer transmitted */#define HDLC_SCCE_BSY 		0x04	/* frame discarded, no buffers */#define HDLC_SCCE_RXF 		0x08	/* complete frame received */#define HDLC_SCCE_TXE 		0x10	/* transmitter error */#define HDLC_SCCE_IDL 		0x20	/* idle sequence status changed */#define HDLC_SCCE_CD  		0x40	/* carrier detect status changed */#define HDLC_SCCE_CTS 		0x80	/* clear to send status changed *//* HDLC Protocol - Receive Buffer Descriptor */#define HDLC_RX_BD_CD		0x0001	/* carrier detect loss during rx */#define HDLC_RX_BD_OV		0x0002	/* receiver overrun */#define HDLC_RX_BD_CRC		0x0004	/* crc error */#define HDLC_RX_BD_ABORT	0x0008	/* abort sequence */#define HDLC_RX_BD_NO		0x0010	/* non-octet frame received */#define HDLC_RX_BD_LG		0x0020	/* rx frame length violation */#define HDLC_RX_BD_FIRST	0x0400	/* buffer first in frame */#define HDLC_RX_BD_LAST		0x0800	/* buffer last in frame */#define HDLC_RX_BD_INT		0x1000	/* interrupt will be generated */#define HDLC_RX_BD_WRAP		0x2000	/* wrap back to first BD */#define HDLC_RX_BD_EXT		0x4000	/* buffer in external memory */#define HDLC_RX_BD_EMPTY	0x8000	/* buffer is empty (available to CP) *//* HDLC Protocol - Transmit Buffer Descriptor */#define HDLC_TX_BD_CT		0x0001	/* cts was lost during tx */#define HDLC_TX_BD_UN		0x0002	/* underrun during tx */#define HDLC_TX_BD_CRC		0x0400	/* transmit crc after last byte */#define HDLC_TX_BD_LAST		0x0800	/* last buffer in current frame */#define HDLC_TX_BD_INT		0x1000	/* interrupt will be generated */#define HDLC_TX_BD_WRAP		0x2000	/* wrap back to first BD */#define HDLC_TX_BD_EXT		0x4000	/* buffer in external memory */#define HDLC_TX_BD_READY	0x8000	/* buffer is being sent (don't touch) *//* BISYNC Protocol - SCC protocol specific parameters */typedef struct		/* PROT_BISYNC */    {    UINT16	rcrc;			/* temporary receive crc */    UINT16	crcc;			/* crc constant */    UINT16	prcrc;			/* preset receiver crc16/lrc */    UINT16	tcrc;			/* temporary transmit crc */    UINT16	ptcrc;			/* preset transmit crc16/lrc */    UINT16	res1;			/* reserved */    UINT16	res2;			/* reserved */    UINT16	parec;			/* receive parity error counter */    UINT16	bsync;			/* bisync sync character */    UINT16	bdle;			/* bisync dle character */    UINT16	cntChar1;		/* control character 1 */    UINT16	cntChar2;		/* control character 2 */    UINT16	cntChar3;		/* control character 3 */    UINT16	cntChar4;		/* control character 4 */    UINT16	cntChar5;		/* control character 5 */    UINT16	cntChar6;		/* control character 6 */    UINT16	cntChar7;		/* control character 7 */    UINT16	cntChar8;		/* control character 8 */    } PROT_BISYNC;/* BISYNC Protocol - SCC Mode Register */#define BISYNC_SCM_HDLC		0x0000	/* hdlc mode */#define BISYNC_SCM_ASYNC	0x0001	/* asynchronous mode (uart/ddcmp) */#define BISYNC_SCM_SYNC		0x0002	/* synchronous mode (ddcmp/v.110) */#define BISYNC_SCM_BISYNC	0x0003	/* bisync/promiscuous mode */#define BISYNC_SCM_ENT		0x0004	/* enable transmitter */#define BISYNC_SCM_ENR		0x0008	/* enable receiver */#define BISYNC_SCM_LOOPBACK	0x0010	/* transmitter hooked to receiver */#define BISYNC_SCM_ECHO		0x0020	/* transmitter echoes received chars */#define BISYNC_SCM_MANUAL	0x0030	/* cts/cd under software control */#define BISYNC_SCM_NRZI		0x0040	/* nrzi tx encoding (nrz otherwise) */#define BISYNC_SCM_SYNF		0x0080	/* send SYN1-SYN2 pairs between msgs */#define BISYNC_SCM_RBCS		0x0100	/* enable receive BCS */#define BISYNC_SCM_RTR		0x0200	/* enable receiver transparent mode */#define BISYNC_SCM_BCS		0x0800	/* CRC16 (LRC otherwise) */#define BISYNC_SCM_REVD		0x1000	/* reverse data (msb first) */#define BISYNC_SCM_NTSYN	0x2000	/* no transmit sync */#define BISYNC_SCM_EXSYN	0x4000	/* external sync mode */#define BISYNC_SCM_EVEN		0x8000	/* even parity *//* BISYNC Protocol - SCC Event Register */#define BISYNC_SCCE_RX		0x01	/* buffer received */#define BISYNC_SCCE_TX		0x02	/* buffer transmitted */#define BISYNC_SCCE_BSY		0x04	/* character discarded, no buffers */#define BISYNC_SCCE_RCH		0x08	/* character received, put in buffer */#define BISYNC_SCCE_TXE		0x10	/* transmitter error */#define BISYNC_SCCE_CD 		0x40	/* carrier detect status changed */#define BISYNC_SCCE_CTS		0x80	/* clear to send status changed *//* BISYNC Protocol - Receive Buffer Descriptor */#define BISYNC_RX_BD_CD		0x0001	/* carrier detect loss during rx */#define BISYNC_RX_BD_OV		0x0002	/* receiver overrun */#define BISYNC_RX_BD_BCS_ERR	0x0004	/* bcs error */#define BISYNC_TX_BD_PARITY	0x0008	/* parity error */#define BISYNC_RX_BD_DLE	0x0010	/* DLE follow character error */#define BISYNC_RX_BD_BCS	0x0400	/* BCS received */#define BISYNC_RX_BD_CNT	0x0800	/* last byte is control character */#define BISYNC_RX_BD_INT	0x1000	/* interrupt will be generated */#define BISYNC_RX_BD_WRAP	0x2000	/* wrap back to first BD */#define BISYNC_RX_BD_EXT	0x4000	/* buffer in external memory */#define BISYNC_RX_BD_EMPTY	0x8000	/* buffer is empty (available to CP) *//* BISYNC Protocol - Transmit Buffer Descriptor */#define BISYNC_TX_BD_CT		0x0001	/* cts was lost during tx */#define BISYNC_TX_BD_UN		0x0002	/* underrun during tx */#define BISYNC_TX_BD_TR		0x0040	/* transparent mode */#define BISYNC_TX_BD_TX_DLE 	0x0080	/* transmit DLE character */#define BISYNC_TX_BD_BR 	0x0100	/* reset BCS accumulation */#define BISYNC_TX_BD_BCS	0x0200	/* include buffer in BCS accumulation */#define BISYNC_TX_BD_BCS_TX	0x0400	/* transmit BCS after last byte */#define BISYNC_TX_BD_LAST	0x0800	/* last buffer in current frame */#define BISYNC_TX_BD_INT	0x1000	/* interrupt will be generated */#define BISYNC_TX_BD_WRAP	0x2000	/* wrap back to first BD */#define BISYNC_TX_BD_EXT	0x4000	/* buffer in external memory */#define BISYNC_TX_BD_READY	0x8000	/* buffer is being sent (don't touch) *//* DDCMP Protocol - SCC protocol specific parameters */typedef struct		/* PROT_DDCMP */    {    UINT16	rcrc;			/* temporary receive crc */    UINT16	crcc;			/* crc constant */    UINT16	pcrc;			/* preset receiver crc16 */    UINT16	tcrc;			/* temporary transmit crc */    UINT16	dsoh;			/* ddcmp soh character */    UINT16	denq;			/* ddcmp enq character */    UINT16	ddle;			/* ddcmp dle character */    UINT16	crc1ec;			/* crc1 error counter */    UINT16	crc2ec;			/* crc2 error counter */    UINT16	nmarc;			/* nonmatching adrs received counter */    UINT16	dismc;			/* discard message counter */    UINT16	rmlg;			/* received message length */    UINT16	rmlgCnt;		/* received message length counter */    UINT16	dmask;			/* user-defined frame address mask */    UINT16	daddr1;			/* user-defined frame address */    UINT16	daddr2;			/* user-defined frame address */    UINT16	daddr3;			/* user-defined frame address */    UINT16	daddr4;			/* user-defined frame address */    } PROT_DDCMP;/* DDCMP Protocol - SCC Mode Register */#define DDCMP_SCM_HDLC		0x0000	/* hdlc mode */#define DDCMP_SCM_ASYNC		0x0001	/* asynchronous mode (uart/ddcmp) */#define DDCMP_SCM_SYNC		0x0002	/* synchronous mode (ddcmp/v.110) */#define DDCMP_SCM_BISYNC	0x0003	/* bisync/promiscuous mode */#define DDCMP_SCM_ENT		0x0004	/* enable transmitter */#define DDCMP_SCM_ENR		0x0008	/* enable receiver */#define DDCMP_SCM_LOOPBACK	0x0010	/* transmitter hooked to receiver */#define DDCMP_SCM_ECHO		0x0020	/* transmitter echoes received chars */#define DDCMP_SCM_MANUAL	0x0030	/* cts/cd under software control */#define DDCMP_SCM_NRZI		0x0040	/* nrzi tx encoding (nrz otherwise) */#define DDCMP_SCM_SYNF		0x0080	/* send SYN1-SYN2 pairs between msgs */#define DDCMP_SCM_V110		0x0400	/* V.110 protocol selected *//* DDCMP Protocol - SCC Event Register */#define DDCMP_SCCE_RBD 		0x01	/* incomplete buffer received */#define DDCMP_SCCE_TX 		0x02	/* buffer transmitted */#define DDCMP_SCCE_BSY 		0x04	/* data byte discarded, no buffers */#define DDCMP_SCCE_RBK 		0x08	/* complete block received */#define DDCMP_SCCE_TXE 		0x10	/* transmitter error */#define DDCMP_SCCE_CD  		0x40	/* carrier detect status changed */#define DDCMP_SCCE_CTS 		0x80	/* clear to send status changed *//* DDCMP Protocol - Receive Buffer Descriptor */#define DDCMP_RX_BD_CD		0x0001	/* carrier detect loss during rx */#define DDCMP_RX_BD_OV		0x0002	/* receiver overrun */#define DDCMP_RX_BD_CRC_ERR	0x0004	/* crc error */#define DDCMP_TX_BD_PARITY	0x0008	/* parity error */#define DDCMP_RX_BD_FR		0x0010	/* framing error */#define DDCMP_RX_BD_CF		0x0020	/* crc follow error */#define DDCMP_RX_BD_DATA	0x0000	/* data message */#define DDCMP_RX_BD_CNT		0x0100	/* control message */#define DDCMP_RX_BD_MAINT	0x0200	/* maintenance message */#define DDCMP_RX_BD_HEADER	0x0400	/* buffer contains header */#define DDCMP_RX_BD_LAST	0x0800	/* last byte is control character */#define DDCMP_TX_BD_INT		0x1000	/* interrupt will be generated */#define DDCMP_RX_BD_WRAP	0x2000	/* wrap back to first BD */#define DDCMP_RX_BD_EXT		0x4000	/* buffer in external memory */#define DDCMP_RX_BD_EMPTY	0x8000	/* buffer is empty (available to CP) *//* DDCMP Protocol - Transmit Buffer Descriptor */#define DDCMP_TX_BD_CT		0x0001	/* cts was lost during tx */#define DDCMP_TX_BD_UN		0x0002	/* underrun during tx */#define DDCMP_TX_BD_OPTLAST	0x0200	/* optional last */#define DDCMP_TX_BD_TX_CRC	0x0400	/* transmit crc16 after last byte */#define DDCMP_TX_BD_LAST	0x0800	/* last buffer in current frame */#define DDCMP_TX_BD_INT		0x1000	/* interrupt will be generated */#define DDCMP_TX_BD_WRAP	0x2000	/* wrap back to first BD */#define DDCMP_TX_BD_EXT		0x4000	/* buffer in external memory */#define DDCMP_TX_BD_READY	0x8000	/* buffer is being sent (don't touch) *//* V.110 Protocol - SCC protocol specific parameters *//* V.110 Protocol - SCC Event Register */#define V110_SCCE_TX 		0x02	/* buffer transmitted */#define V110_SCCE_BSY 		0x04	/* data byte discarded, no buffers */#define V110_SCCE_RXF 		0x08	/* complete frame received */#define V110_SCCE_TXE 		0x10	/* transmitter error *//* V110 Protocol - Receive Buffer Descriptor */#define V110_RX_BD_OV		0x0002	/* receiver overrun */#define V110_RX_BD_SYNC_ERR	0x0008	/* synchronization error */#define V110_RX_BD_WRAP		0x2000	/* wrap back to first BD */#define V110_RX_BD_EXT		0x4000	/* buffer in external memory */#define V110_RX_BD_EMPTY	0x8000	/* buffer is empty (available to CP) *//* V110 Protocol - Transmit Buffer Descriptor */#define V110_TX_BD_UN		0x0002	/* underrun during tx */#define V110_TX_BD_TR		0x0040	/* transparent mode */#define V110_TX_BD_LAST		0x0800	/* last buffer in current frame */#define V110_TX_BD_INT		0x1000	/* interrupt will be generated */#define V110_TX_BD_WRAP		0x2000	/* wrap back to first BD */#define V110_TX_BD_EXT		0x4000	/* buffer in external memory */#define V110_TX_BD_READY	0x8000	/* buffer is being sent (don't touch) */#ifndef	INCLUDE_TY_CO_DRV_50typedef struct          /* TY_CO_DEV */    {    TY_DEV		tyDev;	    /* tyLib will handle this portion */    BOOL		created;    /* true if this device has been created */    char      		numChannels; /* number of channels to support */    int      		clockRate;  /* CPU clock frequency (Hz) */    SCC *		pScc;	    /* serial communication cntrlr */    SCC_REG *		pSccReg;    /* serial communication cntrlr registers */    int       		rxBdNext;   /* next rcv buffer descriptor to fill */    UINT16    		intAck;	    /* interrupt acknowledge mask */    } TY_CO_DEV;/* function declarations */#if defined(__STDC__) || defined(__cplusplus)IMPORT	void	tyCoInt (TY_CO_DEV * pDv);#else	/* __STDC__ */IMPORT	void	tyCoInt ();#endif	/* __STDC__ */#endif	/* INCLUDE_TY_CO_DRV_50 */#endif	/* _ASMLANGUAGE */#ifdef __cplusplus}#endif#endif /* __INCm68302h */

⌨️ 快捷键说明

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