📄 ref3_prphr_int.h
字号:
/*
* +-------------------------------------------------------------------+
* | Copyright (c) 1995,1996,1997 by TriMedia Technologies. |
* | |
* | This software is furnished under a license and may only be used |
* | and copied in accordance with the terms and conditions of such a |
* | license and with the inclusion of this copyright notice. This |
* | software or any other copies of this software may not be provided |
* | or otherwise made available to any other person. The ownership |
* | and title of this software is not transferred. |
* | |
* | The information in this software is subject to change without |
* | any prior notice and should not be construed as a commitment by |
* | TriMedia Technologies. |
* | |
* | This code and information is provided "as is" without any |
* | warranty of any kind, either expressed or implied, including but |
* | not limited to the implied warranties of merchantability and/or |
* | fitness for any particular purpose. |
* +-------------------------------------------------------------------+
*
*
* Module name : ref3_prphr_int.h 1.4
*
* Last update : 18:59:27 - 00/11/09
*
* Description : Defines local typedefs and functions used by ref3
* peripherals
*
* Revision :
*
*/
#ifndef _REF3_PRPHR_INT_H
#define _REF3_PRPHR_INT_H
/********************* Peripheral Init *********************************/
/* Peripheral init is called in dtv_ref3_board_init() */
void ref3_prphr_init(void);
/********************* ISA IO MAP DEVICE INTERFACE *****************/
/********************* PCI Interface **********************************/
/* internal definitions */
#define PCI_IO_BUSY 0x04
#define PCI_IO_DONE 0x08
#define PCI_IO_READ 0x10
#define PCI_IO_WRITE 0x00
#define PCI_VENDOR_ID_TM1S_IREF 0x54001131
#define PCI_VENDOR_ID_SOUTH 0x056510AD
#define CONFIG_TIMEOUT 1000
#define CONFIG_BUSY_BIT 0x01
#define CONFIG_DONE_BIT 0x02
static int pci_cfg_status(UInt32 bits, UInt32 zero_flag);
static void pci_cfg_probs(int i);
/********************* PIC Driver *************************************/
/*-------------------- DEFINITIONS OF PORTS and VALUES ---------------*/
#define MAX_IRQ 0x10
#define PIC_CON_PIN 02
#define M_ICW1 0x20
#define M_ICW2 0x21
#define M_ICW3 0x21
#define M_ICW4 0x21
#define M_OCW1 0x21
#define M_OCW2 0x20
#define M_OCW3 0x20
#define S_ICW1 0xA0
#define S_ICW2 0xA1
#define S_ICW3 0xA1
#define S_ICW4 0xA1
#define S_OCW1 0xA1
#define S_OCW2 0xA0
#define S_OCW3 0xA0
#define ICW1_VAL 0x11 /* ICW1 LTIM ICW4 reqd */
#define M_ICW2_VAL 0x08 /* Vector Dont care */
#define M_ICW3_VAL 0x04 /* Slave connected on Line 2 */
#define ICW4_VAL 0x01 /* Non x86 mode 1 INTA */
#define S_ICW2_VAL 0x70 /* Vector Dont care */
#define S_ICW3_VAL 0x02 /* slave Id = 2 */
#define M_OCW1_VAL 0xFB /* LINE 2 is unmasked for slave */
#define S_OCW1_VAL 0xFF
#define POLL_CMD 0x0C /* OCW3 POLC=1 */
#define EOI_CMD 0x20 /* OCW2 NON-Specific EOI */
static tmLibdevErr_t PICInit(void);
static void PICHandler(void);
/********************* Int C Driver *********************************/
/* internal definitions */
#define FPGA_INT_ENABLE_REG (REF3_ISA_BASE_ADDRESS + 7)
#define FPGA_INT_STATUS_REG (REF3_ISA_BASE_ADDRESS + 7)
#endif /* _REF3_PRPHR_INT_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -