www.pudn.com > PlxSdk.rar > ApiFunctions.h
#ifndef __API_FUNCTIONS_H
#define __API_FUNCTIONS_H
/*******************************************************************************
* Copyright (c) 2007 PLX Technology, Inc.
*
* PLX Technology Inc. licenses this software under specific terms and
* conditions. Use of any of the software or derviatives thereof in any
* product without a PLX Technology chip is strictly prohibited.
*
* PLX Technology, Inc. provides this software AS IS, WITHOUT ANY WARRANTY,
* EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTY OF
* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. PLX makes no guarantee
* or representations regarding the use of, or the results of the use of,
* the software and documentation in terms of correctness, accuracy,
* reliability, currentness, or otherwise; and you rely on the software,
* documentation and results solely at your own risk.
*
* IN NO EVENT SHALL PLX BE LIABLE FOR ANY LOSS OF USE, LOSS OF BUSINESS,
* LOSS OF PROFITS, INDIRECT, INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES
* OF ANY KIND. IN NO EVENT SHALL PLX'S TOTAL LIABILITY EXCEED THE SUM
* PAID TO PLX FOR THE PRODUCT LICENSED HEREUNDER.
*
******************************************************************************/
/******************************************************************************
*
* File Name:
*
* ApiFunctions.h
*
* Description:
*
* The header file for the PLX API functions
*
* Revision History:
*
* 02-01-07 : PLX SDK v5.00
*
******************************************************************************/
#include "DriverDefs.h"
/**********************************************
* Functions
*********************************************/
RETURN_CODE
PlxDeviceFind(
DEVICE_EXTENSION *pdx,
PLX_DEVICE_KEY *pKey,
U8 *pDeviceNumber
);
RETURN_CODE
PlxChipTypeGet(
DEVICE_EXTENSION *pdx,
PLX_DEVICE_KEY *pKey,
U32 *pChipType,
U8 *pRevision
);
RETURN_CODE
PlxChipTypeSet(
DEVICE_EXTENSION *pdx,
PLX_DEVICE_KEY *pKey,
U32 ChipType,
U8 Revision
);
RETURN_CODE
PlxGetPortProperties(
DEVICE_EXTENSION *pdx,
PLX_DEVICE_KEY *pKey,
PLX_PORT_PROP *pPortProp
);
RETURN_CODE
PlxPciBoardReset(
DEVICE_EXTENSION *pdx,
PLX_DEVICE_KEY *pKey
);
U32
PlxRegisterRead(
DEVICE_EXTENSION *pdx,
PLX_DEVICE_KEY *pKey,
U32 offset,
RETURN_CODE *pReturnCode,
BOOLEAN bAdjustForPort
);
RETURN_CODE
PlxRegisterWrite(
DEVICE_EXTENSION *pdx,
PLX_DEVICE_KEY *pKey,
U32 offset,
U32 value,
BOOLEAN bAdjustForPort
);
RETURN_CODE
PlxPciBarProperties(
DEVICE_EXTENSION *pdx,
PLX_DEVICE_KEY *pKey,
U8 BarIndex,
PLX_PCI_BAR_PROP *pBarProperties
);
RETURN_CODE
PlxPciBarMap(
DEVICE_EXTENSION *pdx,
PLX_DEVICE_KEY *pKey,
U8 BarIndex,
VOID *pUserVa,
VOID *pOwner
);
RETURN_CODE
PlxPciBarUnmap(
DEVICE_EXTENSION *pdx,
PLX_DEVICE_KEY *pKey,
VOID *UserVa,
VOID *pOwner
);
RETURN_CODE
PlxEepromPresent(
DEVICE_EXTENSION *pdx,
PLX_DEVICE_KEY *pKey,
PLX_EEPROM_STATUS *pStatus
);
RETURN_CODE
PlxEepromProbe(
DEVICE_EXTENSION *pdx,
PLX_DEVICE_KEY *pKey,
BOOLEAN *pFlag
);
RETURN_CODE
PlxEepromCrcGet(
DEVICE_EXTENSION *pdx,
PLX_DEVICE_KEY *pKey,
U32 *pCrc,
U8 *pCrcStatus
);
RETURN_CODE
PlxEepromCrcUpdate(
DEVICE_EXTENSION *pdx,
PLX_DEVICE_KEY *pKey,
U32 *pCrc,
BOOLEAN bUpdateEeprom
);
RETURN_CODE
PlxEepromReadByOffset(
DEVICE_EXTENSION *pdx,
PLX_DEVICE_KEY *pKey,
U16 offset,
U32 *pValue
);
RETURN_CODE
PlxEepromWriteByOffset(
DEVICE_EXTENSION *pdx,
PLX_DEVICE_KEY *pKey,
U16 offset,
U32 value
);
RETURN_CODE
PlxEepromReadByOffset_16(
DEVICE_EXTENSION *pdx,
PLX_DEVICE_KEY *pKey,
U16 offset,
U16 *pValue
);
RETURN_CODE
PlxEepromWriteByOffset_16(
DEVICE_EXTENSION *pdx,
PLX_DEVICE_KEY *pKey,
U16 offset,
U16 value
);
RETURN_CODE
PlxPciIoPortTransfer(
U64 IoPort,
VOID *pBuffer,
U32 SizeInBytes,
PLX_ACCESS_TYPE AccessType,
BOOLEAN bReadOperation
);
RETURN_CODE
PlxPciPhysicalMemoryAllocate(
DEVICE_EXTENSION *pdx,
PLX_PHYSICAL_MEM *pPciMem,
BOOLEAN bSmallerOk,
VOID *pOwner
);
RETURN_CODE
PlxPciPhysicalMemoryFree(
DEVICE_EXTENSION *pdx,
PLX_PHYSICAL_MEM *pPciMem
);
RETURN_CODE
PlxPciPhysicalMemoryMap(
DEVICE_EXTENSION *pdx,
PLX_PHYSICAL_MEM *pPciMem,
VOID *pOwner
);
RETURN_CODE
PlxPciPhysicalMemoryUnmap(
DEVICE_EXTENSION *pdx,
PLX_PHYSICAL_MEM *pPciMem,
VOID *pOwner
);
RETURN_CODE
PlxInterruptEnable(
DEVICE_EXTENSION *pdx,
PLX_INTERRUPT *pPlxIntr
);
RETURN_CODE
PlxInterruptDisable(
DEVICE_EXTENSION *pdx,
PLX_INTERRUPT *pPlxIntr
);
RETURN_CODE
PlxNotificationRegisterFor(
DEVICE_EXTENSION *pdx,
PLX_INTERRUPT *pPlxIntr,
VOID **pUserWaitObject,
VOID *pOwner
);
RETURN_CODE
PlxNotificationWait(
DEVICE_EXTENSION *pdx,
VOID *pUserWaitObject,
PLX_UINT_PTR Timeout_ms
);
RETURN_CODE
PlxNotificationStatus(
DEVICE_EXTENSION *pdx,
VOID *pUserWaitObject,
PLX_INTERRUPT *pPlxIntr
);
RETURN_CODE
PlxNotificationCancel(
DEVICE_EXTENSION *pdx,
VOID *pUserWaitObject,
VOID *pOwner
);
RETURN_CODE
PlxPciBarSpaceTransfer(
DEVICE_EXTENSION *pdx,
U8 BarIndex,
U32 offset,
U8 *pBuffer,
U32 ByteCount,
PLX_ACCESS_TYPE AccessType,
BOOLEAN bRemap,
BOOLEAN bReadOperation
);
RETURN_CODE
PlxPciVpdRead(
DEVICE_EXTENSION *pdx,
U16 offset,
U32 *pValue
);
RETURN_CODE
PlxPciVpdWrite(
DEVICE_EXTENSION *pdx,
U16 offset,
U32 VpdData
);
#endif