📄 xspccardsocket.h
字号:
/******************************************************************************
**
** COPYRIGHT (C) 2000 - 2003 Intel Corporation.
**
** This software as well as the software described in it is furnished under
** license and may only be used or copied in accordance with the terms of the
** license. The information in this file is furnished for informational use
** only, is subject to change without notice, and should not be construed as
** a commitment by Intel Corporation. Intel Corporation assumes no
** responsibility or liability for any errors or inaccuracies that may appear
** in this document or any software that may be provided in association with
** this document.
** Except as permitted by such license, no part of this document may be
** reproduced, stored in a retrieval system, or transmitted in any form or by
** any means without the express written consent of Intel Corporation.
**
** FILENAME: XsPcCardSocket.h
**
** PURPOSE: This file contains the PCMCIA device driver definitions
** for the Intel(r) XScale(tm) Microarchitecture.
**
** LAST MODIFIED: $Modtime: 7/10/03 1:51p $
******************************************************************************/
#ifndef __XSPCCARDSOCKET_H__
#define __XSPCCARDSOCKET_H__
#include "xllp_defs.h"
#include "xllp_gpio.h"
#include "xllp_serialization.h"
#include "xllp_bcr.h"
#include "xllp_ost.h"
#include "xllp_memctrl.h"
#define XS_MAINSTONE_MAX_PCCARD_SOCKETS 2
#define XS_PCCARD_SOCKET0 0
#define XS_PCCARD_SOCKET1 1
#define XS_NULL_PTR (void *)0
#define XS_PCCARD_MAX_READY_WAIT_TIME 2000
#define XS_PCCARD_READY_POLL_INTERVAL 50
#define TIMERTICK 4 //1 microsecond is 3.7 clock ticks
//PC Card Socket State structure
typedef struct __Xs_PCCardSocketState_S
{
XLLP_VUINT8_T blSocket0CDState;
XLLP_VUINT8_T blSocket0CDIntState;
XLLP_VUINT8_T blSocket0BVD1State;
XLLP_VUINT8_T blSocket0BVD2State;
XLLP_VUINT8_T blSocket0WPState;
XLLP_VUINT8_T blSocket0IREQState;
XLLP_VUINT8_T blSocket1CDState;
XLLP_VUINT8_T blSocket1CDIntState;
XLLP_VUINT8_T blSocket1BVD1State;
XLLP_VUINT8_T blSocket1BVD2State;
XLLP_VUINT8_T blSocket1WPState;
XLLP_VUINT8_T blSocket1IREQState;
}XS_PCCARD_SOCKET_STATE_T, *P_XS_PCCARD_SOCKET_STATE_T;
//PC Card Socket Device Handle. This handle is common for all sockets.
typedef struct __Xs_PCCardSocket_S
{
XLLP_GPIO_T *pstrGpioRegsHandle; //Pointer to the BULVERDE GPIO registers base
XLLP_BCR_T *pstrBcrHandle; //Pointer to the MAINSTONE Board Control registers structure
XLLP_OST_T *pstrOstRegsHandle; //Pointer to the OST registers base
XLLP_MEMORY_CONTROL_REGISTER_T *pstrMemCtrlRegsHandle; //Pointer to the Expansion Memory Timing registers base
XS_PCCARD_SOCKET_STATE_T *pstrPCCardSocketState; //Pointer to the Socket State structure
}XS_PCCARD_SOCKET_T, *P_XS_PCCARD_SOCKET_T;
//Possible return states for the PC Card Socket API functions
typedef enum __XsStatus_S
{
XS_PCCARD_SUCCESS = 0,
XS_PCCARD_FAILURE = 1,
XS_PCCARD_INVALID_SOCKET_NUMBER = 2,
XS_PCCARD_INVALID_POINTER_ALLOC = 3
}XS_STATUS_T;
// Function prototypes
XS_STATUS_T XsPcCardHWSetup(XS_PCCARD_SOCKET_T *pstrSocketHandle);
void XsPcCardConfigureGPIOs(XS_PCCARD_SOCKET_T *pstrSocketHandle);
XS_STATUS_T XsPcCardGetSocketState(XS_PCCARD_SOCKET_T *pstrSocketHandle,
XLLP_VUINT16_T ushSocketNumber);
XS_STATUS_T XsPcCardResetSocket(XS_PCCARD_SOCKET_T *pstrSocketHandle,
XLLP_VUINT16_T ushSocketNumber);
XS_STATUS_T XsPcCardEnableSocket(XS_PCCARD_SOCKET_T *pstrSocketHandle,
XLLP_VUINT16_T ushSocketNumber);
XS_STATUS_T XsPcCardDisableSocket(XS_PCCARD_SOCKET_T *pstrSocketHandle,
XLLP_VUINT16_T ushSocketNumber);
#endif //__XSPCCARDSOCKET_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -