?? zl5011xadm.h
字號:
/*******************************************************************************
*
* File name: zl5011xAdm.h
*
* Version: 28
*
* Author: LCW
*
* Date created: 21/03/02
*
* Copyright 2002, 2003, 2004, 2005, Zarlink Semiconductor Limited.
* All rights reserved.
*
* Module Description:
*
* This is the header file for the ADM block.
* It contains the function prototypes and any definitions.
*
* Revision History:
*
* Rev: Date: Author: Comments:
* 1 22/03/02 LCW Created.
* 2 26/03/02 LCW Minor mods.
* 3 27/03/02 LCW Minor mods.
* 4 28/03/02 LCW Minor mods.
* 5 03/04/02 LCW Minor mods.
* 6 03/04/02 LCW Minor mods.
* 7 03/04/02 LCW Minor mods.
* 8 11/04/02 LCW Minor mods.
* 9 15/04/02 LCW Prepared for code review.
* 10 17/04/02 LCW Code review actions.
* 11 18/04/02 LCW Code review actions.
* 12 18/04/02 LCW Changed interrupt & enable constants and
* registers.
* 13 18/04/02 LCW Minor mods.
* 14 19/04/02 LCW Minor mods.
* 15 23/04/02 LCW Code review actions.
* 16 24/04/02 LCW Code review actions.
* 17 26/04/02 LCW Added function prototype for
* zl5011xAdmSetInitStatus
* 18 19/04/02 LCW Minor mods.
* 19 24/04/02 LCW Code review actions.
* 20 07/06/02 LCW Added zl5011xAdmGetInterruptStatus.
* 21 12/07/02 MRC Interrupt bits changed
* 22 26/09/02 DJA zl5011xGetBootStrapMode renamed to
* zl5011xAdmGetBootStrapMode
* 23 01/10/02 DJA unwanted #def ZL5011X_INT_RTP_BIT
* 24 30/10/02 MRC Updated the device ID function to split out the
* version ID
* 25 31/10/2002 MRC Added variants + minor fixes
* 26 09/12/2002 MRC Added TM init / run bit
* 27 07/08/2003 APL Restricted which enable bits are valid for ZL50130 device
* 28 28/01/2005 MRC Added mask for the GPIO write functions
*
*******************************************************************************/
#ifndef _ZL5011X_ADM_H_
#define _ZL5011X_ADM_H_
#ifdef __cplusplus
extern "C" {
#endif
/***************** DATA TYPES *********************************************/
/***************** # DEFINES **********************************************/
#define ZL5011X_ADM_RESET_KEY 0xBA0A537D
#define ZL5011X_ADM_SET_FREEZE 0x00000001
#define ZL5011X_ADM_GPIO_PINS_OUT 0xFFFFFFFF
/* The following constants define the bits used to initialise blocks */
#define ZL5011X_ADM_TFM_BIT ZL5011X_1BIT_MASK
#define ZL5011X_ADM_TFQ_BIT (ZL5011X_1BIT_MASK << 1)
#define ZL5011X_ADM_PLA_BIT (ZL5011X_1BIT_MASK << 2)
#define ZL5011X_ADM_RTP_BIT (ZL5011X_1BIT_MASK << 3)
#define ZL5011X_ADM_TIF_BIT (ZL5011X_1BIT_MASK << 5)
#define ZL5011X_ADM_PAC_BIT (ZL5011X_1BIT_MASK << 6)
#define ZL5011X_ADM_PKI_BIT (ZL5011X_1BIT_MASK << 8)
#define ZL5011X_ADM_PKQ_BIT (ZL5011X_1BIT_MASK << 9)
#define ZL5011X_ADM_PKC_BIT (ZL5011X_1BIT_MASK << 10)
#define ZL5011X_ADM_TM_BIT (ZL5011X_1BIT_MASK << 11)
#define ZL5011X_ADM_PRX_BIT (ZL5011X_1BIT_MASK << 12)
#define ZL5011X_ADM_PTX_BIT (ZL5011X_1BIT_MASK << 13) /*Not used for
initialisation*/
#define ZL5011X_ADM_GM_BIT (ZL5011X_1BIT_MASK << 14)
/* Blocks which need initialisation must always be initialised , even if they are not used.
Don't initialise TDM nor PTX */
#define ZL5011X_ADM_INIT_ALL_BLOCKS (ZL5011X_ADM_RTP_BIT | ZL5011X_ADM_GM_BIT | \
ZL5011X_ADM_TFM_BIT | ZL5011X_ADM_TFQ_BIT | ZL5011X_ADM_PLA_BIT | \
ZL5011X_ADM_TIF_BIT | ZL5011X_ADM_PAC_BIT | \
ZL5011X_ADM_PKI_BIT | ZL5011X_ADM_PKQ_BIT | ZL5011X_ADM_PKC_BIT | \
ZL5011X_ADM_PRX_BIT ) /* 0x576F in hex */
#define ZL5011X_ADM_ENABLE_ALL_BLOCKS (ZL5011X_ADM_RTP_BIT | ZL5011X_ADM_GM_BIT | ZL5011X_ADM_TM_BIT | \
ZL5011X_ADM_TFM_BIT | ZL5011X_ADM_TFQ_BIT | ZL5011X_ADM_PLA_BIT | \
ZL5011X_ADM_TIF_BIT | ZL5011X_ADM_PAC_BIT | \
ZL5011X_ADM_PKI_BIT | ZL5011X_ADM_PKQ_BIT | ZL5011X_ADM_PKC_BIT | \
ZL5011X_ADM_PRX_BIT | ZL5011X_ADM_PTX_BIT ) /* 0x7F6F in hex */
/* Check masks to ensure only valid bits written to the registers */
#define ZL5011X_ADM_INIT_CHECK_MASK ZL5011X_ADM_INIT_ALL_BLOCKS
#define ZL5011X_ADM_ENABLE_CHECK_MASK ZL5011X_ADM_ENABLE_ALL_BLOCKS
#define ZL5011X_ADM_BIT_CHECK 0x0000FFFF
#define ZL5011X_ADM_BOOTSTRAP_MASK 0x0000FFFF
#define ZL5011X_ADM_CONSTAT_MASK 0x00000003
/* The following constants define the interrupt sources */
#define ZL5011X_ADM_INTERRUPT_CHECK_MASK 0x007FFFFF
/***************** INCLUDE FILES ******************************************/
/***************** DATA STRUCTURES ****************************************/
/***************** EXPORTED GLOBAL VARIABLE DECLARATIONS ******************/
/***************** EXTERNAL FUNCTION DECLARATIONS *************************/
zlStatusE zl5011xAdmInit(zl5011xParamsS *zl5011xParams);
zlStatusE zl5011xAdmSetInitStatus(zl5011xParamsS *zl5011xParams,
Uint32T blockMask);
zlStatusE zl5011xAdmGetInitStatus(zl5011xParamsS *zl5011xParams,
Uint32T *blockInitStatus);
zlStatusE zl5011xAdmResetDevice(zl5011xParamsS *zl5011xParams);
zlStatusE zl5011xAdmInitiateFreeze(zl5011xParamsS *zl5011xParams);
zlStatusE zl5011xAdmGetFreezeState(zl5011xParamsS *zl5011xParams,
zl5011xBooleanE *freezeState);
zlStatusE zl5011xAdmEnableBlocks(zl5011xParamsS *zl5011xParams,
Uint32T enableBlocks);
zlStatusE zl5011xAdmEnableInterrupt(zl5011xParamsS *zl5011xParams,
zl5011xEnableInterruptE enableInterruptMask);
zlStatusE zl5011xAdmDisableInterrupt(zl5011xParamsS *zl5011xParams,
zl5011xEnableInterruptE interrupt);
zlStatusE zl5011xAdmEnableInterruptSource(zl5011xParamsS *zl5011xParams,
zl5011xInterruptValueE interrupt, Uint32T interruptSourceMask);
zlStatusE zl5011xAdmClearInterruptSource(zl5011xParamsS *zl5011xParams,
Uint32T interruptClearMask);
zlStatusE zl5011xAdmDisableInterruptSource(zl5011xParamsS *zl5011xParams,
zl5011xInterruptValueE interrupt, Uint32T interruptSourceMask);
zlStatusE zl5011xAdmGetInterruptStatus(zl5011xParamsS *zl5011xParams,
Uint32T *interruptStatusBits);
zlStatusE zl5011xAdmGetDeviceId(zl5011xParamsS *zl5011xParams,
Uint32T *chipId, Uint32T *version);
zlStatusE zl5011xAdmGpioRead(zl5011xParamsS *zl5011xParams,
Uint32T *gpio);
zlStatusE zl5011xAdmGpioWrite(zl5011xParamsS *zl5011xParams,
Uint16T gpioWriteValue, Uint16T mask);
zlStatusE zl5011xAdmGpioMode(zl5011xParamsS *zl5011xParams,
Uint16T gpioPins, Uint16T mask);
zlStatusE zl5011xAdmGetBootStrapMode(zl5011xParamsS *zl5011xParams,
Uint16T *bootStrapMode);
#ifdef __cplusplus
}
#endif
#endif /* _ZL5011X_ADM_H_ */
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -