📄 ixf_api.h
字号:
/*
*---------------------------------------------------------------------------
*
* I N T E L P R O P R I E T A R Y
*
* COPYRIGHT (c) 2001 BY INTEL CORPORATION. ALL RIGHTS
* RESERVED. NO PART OF THIS PROGRAM OR PUBLICATION MAY
* BE REPRODUCED, TRANSMITTED, TRANSCRIBED, STORED IN A
* RETRIEVAL SYSTEM, OR TRANSLATED INTO ANY LANGUAGE OR COMPUTER
* LANGUAGE IN ANY FORM OR BY ANY MEANS, ELECTRONIC, MECHANICAL,
* MAGNETIC, OPTICAL, CHEMICAL, MANUAL, OR OTHERWISE, WITHOUT
* THE PRIOR WRITTEN PERMISSION OF :
*
* INTEL CORPORATION
*
* 2200 MISSION COLLEGE BLVD
*
* SANTA CLARA, CALIFORNIA 95052-8119
*
*---------------------------------------------------------------------------
*
*
* AUTHOR: $Author: lagarwal $
* DATE: $Date: 2003/07/25 21:29:11 $
* LAST MODIFIED: $Modtime: 5/14/02 4:02p $
* REV#: $Revision: 1.3 $
* LOGFILE: $Logfile: /Embedded/source/drivers/ixf/ixf_api.h $
* WORKFILE: $Workfile: ixf_api.h $
*
* --------------------------------------------------------------------------
* Project: ALL
*
* Purpose: Provides the API common interface to all IXF chips.
*
* Notes:
*
* --------------------------------------------------------------------------
* CompilerFlags:
* --------------------------------------------------------------------------
* --------------------------------------------------------------------------
* $Log: ixf_api.h,v $
* Revision 1.3 2003/07/25 21:29:11 lagarwal
* Clean up
*
* Revision 1.2 2002/11/22 18:37:22 lagarwal
* no message
*
* Revision 1.1.1.1 2002/11/15 17:51:12 lagarwal
* rename dir
*
* Revision 1.3 2002/09/09 21:49:20 cmah1
* no message
*
* Revision 1.1 2002/05/22 00:05:42 machambe
* Initial update
*
*
* 25 5/14/02 4:14p Machambe
* Added InitChip 2nd Param.
*
* 24 4/18/02 11:31a Jaalliso
* Opmode parameter for GetOpmode should be passed by reference
*
* 23 2/07/02 5:02p Skadrix
* Added a section (ChipSegment) parameter to the TestCfg API function.
*
* 22 12/05/01 3:26p Pkjain2
*
* 21 11/18/01 10:49p Machambe
*
* 20 11/15/01 6:40p Machambe
*
* 19 11/14/01 2:21p Machambe
* Fixing CfgTest
*
* 18 7/20/01 9:11a Machambe
* Adding IxfApiGetBuildVersion
*
* 17 6/25/01 10:54a Machambe
*
* 16 5/03/01 3:54p Machambe
*
* --------------------------------------------------------------------------
*/
#ifndef _IXF_FUNC_H_ /* Include file contents only once per compilation */
#define _IXF_FUNC_H_
/******************************************************************
* Function : IxfApiInit
*-----------------------------------------------------------------
* Description : This routine initializes the main data structure
* and returns a handle to that structure.
*-----------------------------------------------------------------
* Inputs : baseAddress : Specifies the base address of the device
* chipType : Specifices the type of device
* pChipData : A pointer to an allocated structure.
* Outputs : pChipData : A pointer to the chip data structure.
* This structure is passed to most API
* routines.
*-----------------------------------------------------------------
* Returns : bb_Error_e Returns Error Condition if Not successful
*-----------------------------------------------------------------
* Access Globals : None.
*-----------------------------------------------------------------
******************************************************************/
extern bb_Error_e
IxfApiInit(void *baseAddress, bb_ChipType_e chipType,
bb_ChipData_t *pChipData);
/******************************************************************
* Function : IxfApiInitChip
*-----------------------------------------------------------------
* Description : This routine commits the internal register table
* down to the chip and initializes the bb_ChipData_t
* structure.
*-----------------------------------------------------------------
* Inputs : pChipData : A pointer to an allocated structure.
* pTable
* Outputs : None.
*-----------------------------------------------------------------
* Returns : bb_Error_e Returns Error Condition if Not successful
*-----------------------------------------------------------------
* Access Globals : None.
*-----------------------------------------------------------------
******************************************************************/
extern bb_Error_e
IxfApiInitChip(bb_ChipData_t *pChipData, InitRegTable_t *pTable);
#if 0
/******************************************************************
* Function : IxfApiAllocDataStructureMem
*-----------------------------------------------------------------
* Description : This routine dynamically allocates memory within
* the "pChipData" parameter for those members that
* need dynamic allocation.
*-----------------------------------------------------------------
* Inputs : pChipData : A pointer to the chip data structure without
* pointers memory allocation.
* Outputs : pChipData : A pointer to the chip data structure with
* pointer memory allocation.
*-----------------------------------------------------------------
* Returns : bb_Error_e Returns Error Condition if Not successful
*-----------------------------------------------------------------
* Access Globals : None.
*-----------------------------------------------------------------
* Comments : See IxfApiInit for the completion of the initialization
******************************************************************/
extern bb_Error_e
IxfApiAllocDataStructureMem(bb_ChipData_t *pChipData);
/******************************************************************
* Function : IxfApiDeAllocMemory
*-----------------------------------------------------------------
* Description : This routine frees the dynamically allocated memory
* within the "pChipData" structure
*-----------------------------------------------------------------
* Inputs : pChipData : A pointer to the chip data structure.
* Outputs : None.
*-----------------------------------------------------------------
* Returns : Status
*-----------------------------------------------------------------
* Access Globals : None.
*-----------------------------------------------------------------
* Comments : None.
******************************************************************/
extern bb_Error_e
IxfApiDeAllocMemory(bb_ChipData_t *pChipData);
/******************************************************************
* Function : IxfApiSetCfg
*-----------------------------------------------------------------
* Description : This routine is used to configure the chip.
* Many different types of configurations could be
* performed with the combination of SelCfg and the
* generic pointer of the ptCfg.
*-----------------------------------------------------------------
* Inputs : pChipData : pointer to the chip information.
* ptSegment : pointer to chip segment structure
* SelCfg : enum value defining what configuration
* needs to be set
* Outputs : None.
*-----------------------------------------------------------------
* Returns : bb_NO_ERROR, bb_INV_PARAMETER
*-----------------------------------------------------------------
* Access Globals : None.
*-----------------------------------------------------------------
* Comments :
******************************************************************/
extern bb_Error_e
IxfApiSetCfg(bb_ChipData_t *pChipData, bb_ChipSegment_t *ptSegment,
bb_SelConfig_e SelCfg);
/******************************************************************
* Function : IxfApiGetCfg
*-----------------------------------------------------------------
* Description : This routine is used to get the configuration of
* the chip. Many different types of configurations
* could be performed with the combination of SelCfg
* and the sgeneric pointer of the ptCfg.
*-----------------------------------------------------------------
* Inputs : pChipData : pointer to the chip information.
* ptSegment : pointer to chip segment structure
* SelCfg : enum value defining what configuration
* needs to be retrieved
* Outputs : None
*-----------------------------------------------------------------
* Returns : bb_NO_ERROR, bb_INV_PARAMETER
*-----------------------------------------------------------------
* Access Globals : None.
*-----------------------------------------------------------------
* Comments :
******************************************************************/
extern bb_Error_e
IxfApiGetCfg(bb_ChipData_t *pChipData, bb_ChipSegment_t *ptSegment,
bb_SelConfig_e SelCfg);
/******************************************************************
* Function : IxfApiGetStatus
*-----------------------------------------------------------------
* Description : Gets the Status.
*-----------------------------------------------------------------
* Inputs : pChipData : Initialized Chip Data
* section : Determines the section(block) to get the
* status from.
* selStatus : Type of Status:
* Outputs : pStatus : Place to put Status.
*-----------------------------------------------------------------
* Returns : bb_Error_e Returns Error Condition if Not successful
*-----------------------------------------------------------------
* Access Globals : None.
*-----------------------------------------------------------------
* Comments : None.
******************************************************************/
extern bb_Error_e
IxfApiGetStatus(bb_ChipData_t *pChipData, bb_ChipSegment_t *section,
bb_SelStatus_e selStatus, void *pStatus);
/******************************************************************
* Function : IxfApiGetOpMode
*-----------------------------------------------------------------
* Description : Gets the operation mode of the chip.
*-----------------------------------------------------------------
* Inputs : pChipData : Initialized Chip Data
* section : Determines the section(block) to get the
* status from.
* opMode : The mode of operation.
* Outputs : pModeCfg : Place to put mode.
*-----------------------------------------------------------------
* Returns : bb_Error_e Returns Error Condition if Not successful
*-----------------------------------------------------------------
* Access Globals : None.
*-----------------------------------------------------------------
* Comments : None.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -