📄 pcmciapd.h
字号:
//
// Copyright(C) Renesas Technology Corp. 2005. All rights reserved.
//
// PCCARD driver for ITS-DS7
//
// FILE : pcmciapd.h
// CREATED : 2005.02.03
// MODIFIED :
// AUTHOR : Renesas Technology Corp.
// HARDWARE : RENESAS ITS-DS7
// HISTORY :
// 2005.02.03
// - Created release code.
// (based on PCCARD driver for ASPEN for WCE5.0)
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
/*
Copyright(c) 1998,1999 SIC/Hitachi,Ltd.
Module Name:
pcmciapd.h
Revision History:
26th April 1999 Released
23rd September 1999 Fixed minor bug
*/
#ifndef _PCMCIAPD_H_
#define _PCMCIAPD_H_
#ifdef DEBUG
#define ZONE_PDD DEBUGZONE(8)
#define ZONE_POWER DEBUGZONE(9)
#endif
typedef struct _PCMCIA_REGISTER_LAYOUT {
PVSHORT pMOD; // Mode Reg
PVSHORT pOPT; // Option Reg
PVSHORT pCST; // Card Status Reg
PVSHORT pINTR; // Interrupt Request Reg
PVSHORT pINTC; // Interrupt Control Reg
PVSHORT pCPWC; // Card Power Control Reg
PVSHORT pMW0C1; // Memory Window 0 Control Reg 1
PVSHORT pMW1C1; // Memory Window 1 Control Reg 1
PVSHORT pIOWC1; // IO Window Control Reg 1
PVSHORT pMW0C2; // Memory Window 0 Control Reg 2
PVSHORT pMW1C2; // Memory Window 1 Control Reg 2
PVSHORT pIOWC2; // IO Window Control Reg 2
PVSHORT pCCN; // Card Control Reg
PVSHORT pCIN; // PCIC Info Reg
} PCMCIA_REGISTER_LAYOUT, *PPCMCIA_REGISTER_LAYOUT;
typedef struct _POWER_REGISTER_LAYOUT {
PVUSHORT pCC_PACR; // CC_Port A control Reg
PVUSHORT pDUMMY1;
PVUSHORT pCC_PADR; // CC_Port A Data Reg
PVBYTE pDUMMY2;
}POWER_REGISTER_LAYOUT, *PPOWER_REGISTER_LAYOUT;
typedef struct _POWER_REGISTER_VALUES {
int bValid; // is this a balid soution ?
BYTE CardPowerReg; // Card Power Control Reg
}POWER_REGISTER_VALUES, *PPOWER_REGISTER_VALUES;
typedef UINT8 PCMCIA_POWER_SETTING;
BOOL SetPower(int uSock, int VCC_index, int VPP_index, BOOL bReEnable, BOOL bKernelMode);
#define SOCKET0_SHIFT 0
#define SOCKET0_MASK 0xF
#define SOCKET1_SHIFT 4
#define SOCKET1_MASK 0xF0
#define BAD_VCC 0xFF
#define BAD_VPP 0xFE
#define PCMCIA_RDY_POLL_INT 50
#define PCMCIA_MAX_RDY_WAIT_TIME 2000
#define NUM_SLOTS 2
#define NUM_POWER_ENTRIES 4
#define MASK_16MB_AVAIL 0x03000000
#define MASK_16MB_UPPER 0xFF000000
#define ENABLED_5V(uSock) (READ_REGISTER_USHORT(PcmciaRegisters[uSock].pCPWC) & MR_SHPC_CPWC_VCC_5V)
#define ENABLED_3V(uSock) (READ_REGISTER_USHORT(PcmciaRegisters[uSock].pCPWC) & MR_SHPC_CPWC_VCC_3V)
#define POWER_ENABLED(uSock) ((ENABLED_5V(uSock) || ENABLED_3V(uSock)) && (!(ENABLED_5V(uSock) && ENABLED_3V(uSock))))
//#define PCMCIA_NUM_WINDOWS 6
#endif // _PCMCIAPD_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -