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

📄 comemlif.h

📁 The Lite Evaluation/Demonstration Kit is intended to illustrate use of the AN3042. The AN3042 is c
💻 H
字号:
//////////////////////////////////////////////////////////////////////
//
// File: comemL_if.h 
//
// $Archive: /ComemL/Host/ComemLif/ComemLif.h $
//
// Copyright (c) 1997 Anchor Chips, Inc.  May not be reproduced without
// permission.  See the license agreement for more details.
//
//////////////////////////////////////////////////////////////////////
#pragma once
#include "utils.h"
#define ONE_K 1024
#define ONE_MEG (ONE_K * ONE_K)

// TPM: modified for 3042
const int ADDR_I2OHISR = 0x030;
const int ADDR_I2OHIMR = 0x034;
const int ADDR_I2OLISR = 0x038;
const int ADDR_I2OLIMR = 0x03C;
const int ADDR_I2OIBP  = 0x040;
const int ADDR_I2OIBF  = 0x044;
const int ADDR_I2OOBP  = 0x048;
const int ADDR_I2OOBF  = 0x04C;

const int ADDR_DAHBASE = 0x460;
const int ADDR_NVCMD   = 0x4a0;
const int ADDR_NVREAD  = 0x4a4;
const int ADDR_NVSTAT  = 0x4a8;

const int ADDR_DMALBASE= 0x4B0;
const int ADDR_DMAHBASE= 0x4B4;
const int ADDR_DMASIZE = 0x4B8;
const int ADDR_DMACTL  = 0x4BC;

const int ADDR_HCTL    = 0x4e0;
const int ADDR_HINT    = 0x4e4;
const int ADDR_HLDATA  = 0x4e8;
const int ADDR_LINT    = 0x4f4;
const int ADDR_LHDATA  = 0x4f8;
const int ADDR_LBUSCFG = 0x4fC;

//////////////////////////////////////////////////////////////////////
// EEPROM related values
//////////////////////////////////////////////////////////////////////
#define  MAX_EEPROM_ADDR  ( 0x800)
#define  EEPROM_ADDR_MASK  ( 0x700)
#define  EEPROM_WRITE_ENABLE  ( 0)
#define  EEPROM_4READ_ENABLE  ( 3 )

#define  SERIAL_REG2_DONE_BIT  ( 1)
#define  SERIAL_WRITE_ACK_MASK  ( 0xe0)
#define  SERIAL_READ_ACK_MASK  ( 0xe0)

#define  EEPROM_WRITE  ( 0)
#define  EEPROM_READ  ( 1)

//////////////////////////////////////////////////////////////////////
// VxD related values
//////////////////////////////////////////////////////////////////////
#include "comemdrv.h"

/////////////////////////////////////////////////////////////////////////////			 
// Vxd Interface functions
DWORD comemOpenDriverL(DWORD comemID);
DWORD comemCloseDriverL(DWORD comemID);
DWORD comemCopyBarPtrL(DWORD linBAR[COMEM_MAX_BARS], DWORD comemID);                                                                            
DWORD comemGetPCIInfoL(PCI_CONFIG_HEADER_0 *pciPtr, DWORD comemID);
DWORD comemSetPCIInfoL(PCI_CONFIG_HEADER_0 *pciPtr, DWORD comemID);
DWORD comemAllocContigMemL(DWORD pageCount, DWORD *linearAddr, DWORD *physAddr, DWORD comemID);                                                                                                                                                
DWORD comemDeAllocContigMemL(DWORD *linearAddr, DWORD *physAddr, DWORD comemID);                                                                                                                                                          
DWORD comemGetVersionL(DWORD comemID);

DWORD comemGetStatusL(DWORD *refCount, DWORD comemID);
DWORD comemCreateBarPtrL(DWORD linBAR[COMEM_MAX_BARS], DWORD comemID);
DWORD comemDestroyBarPtrL(DWORD comemID);

⌨️ 快捷键说明

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