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

📄 vt82c686pciibc.h

📁 cpc-1631的BSP包for VxWorks操作系统
💻 H
字号:
/* vt82c686PciIbc.h - via vt82c686 System I/O Controller with PCI
 *                     Register definitions */

/* Copyright 2007 evoc */

/*
modification history
--------------------
*/

#ifndef	__INCvt82c686PciIbch
#define	__INCvt82c686PciIbch

#ifdef __cplusplus
extern "C" {
#endif

/* structure */

#define  VT_MAX_IRQS      	16

/* via ids */

#define VT_VENDOR_ID 		0x1106
#define VT_DEVICE_ID 		0x0686

/*  Hardware access methods */

#ifndef  PIC_BYTE_OUT

/*   Write byte to the PIC register  */

#define  PIC_BYTE_OUT(reg,data)  \
    (sysOutByte (reg + PCI_MSTR_ISA_IO_LOCAL,data))

#endif	/* PIC_BYTE_OUT */

#ifndef	PIC_BYTE_IN
    
/*   Read byte from the PIC register  */

#define  PIC_BYTE_IN(reg,pData)  \
    (*pData = sysInByte (reg+PCI_MSTR_ISA_IO_LOCAL))

#endif	/* PIC_BYTE_IN */

#define  MEM_READ(reg,pData)  (*pData = sysInByte (reg))
#define  MEM_WRITE(reg,data)  (sysOutByte (reg,data))

/*  Programmable Interrupt Controller Registers  */

#define PIC1_ICW1		0x20	  /* Initialization write only */
#define PIC2_ICW1		0xA0	  /* Initialization write only */

#define PIC1_OCW2		0x20	  /* Operation write only */
#define PIC2_OCW2		0xA0	  /* Operation write only */

#define PIC1_OCW3		0x20	  /* Operation */
#define PIC2_OCW3		0xA0	  /* Operation */

#define PIC1_ICW2		0x21	  /* Initialization write only */
#define PIC2_ICW2		0xA1	  /* Initialization write only */

#define PIC1_ICW3		0x21	  /* Initialization write only */
#define PIC2_ICW3		0xA1	  /* Initialization write only */

#define PIC1_ICW4		0x21	  /* Initialization write only  */
#define PIC2_ICW4		0xA1	  /* Initialization write only  */

#define PIC1_OCW1		0x21	  /* Operation */
#define PIC2_OCW1		0xA1	  /* Operation */

#define PIC1_IACK		0x00	  /* port 1 base address */
#define PIC2_IACK		0x01	  /* port 2 base address */

/*  These are mapped to ISA I/O Space  */

#define vt82c686_INT1_CTRL	0x0020 /* PIC1 */
#define vt82c686_INT1_MASK	0x0021
#define vt82c686_INT1_ECLR	0x04d0
#define vt82c686_INT2_CTRL	0x00a0 /* PIC2 */
#define vt82c686_INT2_MASK	0x00a1
#define vt82c686_INT2_ECLR	0x04d1
#define vt82c686_TRM1_CNT0	0x0040
#define vt82c686_TRM1_CNT1	0x0041
#define vt82c686_TRM1_CNT2	0x0042
#define vt82c686_TRM1_CMOD	0x0043
#define vt82c686_RST_IRQ12	0x0060
#define vt82c686_NMI_SCTRL	0x0061
#define vt82c686_PCOP		0x0c04
#define vt82c686_TMCP		0x0c01

IMPORT void 	pciIbcIntHandler (int arg);
IMPORT STATUS  	sysPciIbcIntrInit (int viaIrq);
    
#ifdef __cplusplus
}
#endif

#endif	/* __INCvt82c686PciIbch */

⌨️ 快捷键说明

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