亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? zl5011xadm.c

?? Zalink50114----TDMoIP芯片驅動源碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*******************************************************************************
*
*  File name:              zl5011xAdm.c
*
*  Version:                49
*
*  Author:                 LCW
*
*  Date created:           22/03/2002
*
*  Copyright 2002, 2003, 2004, 2005, Zarlink Semiconductor Limited.
*  All rights reserved.
*
*  Module Description:
*
*  This module contains all the functions that are to control the ADM block.
*  The main responsibilites of the ADM block are
*  Interrupt handling
*  System reset
*  Initiate debug/freeze mode
*  Monitor internal modules
*  Provide initialisation signals
*
*  Revision History:
*
*  Rev:  Date:       Author:  Comments:
*  1     22/03/2002  LCW      Creation.
*  2     26/03/2002  LCW      Minor Mods.
*  3     27/03/2002  LCW      Minor Mods.
*  4     28/03/2002  LCW      Minor Mods.
*  5     03/04/2002  LCW      Minor Mods.
*  6     03/04/2002  LCW      Minor Mods.
*  7     03/04/2002  LCW      Minor Mods.
*  8     11/04/2002  LCW      Minor Mods.
*  9     15/04/2002  LCW      Prepared for code review.
*  10    17/04/2002  LCW      Code review actions.
*  11    18/04/2002  LCW      Code review actions.
*  12    18/04/2002  LCW      Changed interrupt & enable constants and
*                                  registers.
*  13    18/04/2002  LCW      Changed comments.
*  14    19/04/2002  LCW      Minor Mods.
*  15    19/04/2002  LCW      Changed zl5011xAdmClearInterruptSource
*  16    19/04/2002  LCW      Minor mods.
*  17    23/04/2002  LCW      Code review actions.
*  18    24/04/2002  LCW      Code review actions.
*  19    26/04/2002  LCW      Added function zl5011xAdmSetInitStatus
*  20    29/04/2002  LCW      Code review actions
*  21    29/04/2002  LCW      Minor mods.
*  22    29/04/2002  LCW      Minor mods.
*  23    29/04/2002  LCW      Minor mods.
*  24    31/05/2002  MRC      Tidied up and fixed uninitialised status
*                                 problem in function zl5011xAdmSetInitStatus
*  25    07/06/2002  LCW      Added zl5011xAdmGetInterruptStatus
*  26    19/06/2002  PJE      modified interruptMasks in structure
*  27    12/07/2002  MRC      Changed function headers due to ADM block change
*  28    05/08/2002  MRC      Used inconsistent error codes
*  29    28/08/2002  PJE      First clear the interrupts before enabling.
*  30    26/09/2002  DJA      zl5011xGetBootStrapMode renamed to
*                             zl5011xAdmGetBootStrapMode
*  31    09/10/2002  PJE      mod for debugging with no device
*  32    29/10/2002  DJA      mod to function zl5011xAdmGetFreezeState, return true
*                             if either bit in the freeze register is set.
*  33    30/10/2002  MRC      Added in variant initialisation to the init fn
*  34    31/10/2002  MRC      Added variants + minor fixes
*  35    05/11/2002  MRC      Added more variants
*  36    06/11/2002  MRC      Added enum to store variant type
*  37    03/12/2002  MRC      Updated variant information
*  38    07/03/2003  MRC      Fixed register error in zl5011xAdmGpioWrite
*  39    03/04/2003  MRC      Initialises the interrupts to off at start, and
*                             added protection around changing the interrupt
*                             masks
*  40    09/06/2003  DJA      Performed pre-audit actions
*  41    29/07/2003  APL      Renamed global wanLimits structure to devLimits
*  42    04/08/2003  APL      Return an error if the API type mismatches device type
*  43    05/08/2003  APL      Applications written with ZL50130 API can execute on ZL5011x devices
*  44    23/07/2004  MRC      Fixed some compiler warnings
*  45    29/07/2004  MRC      Fixed some compiler warnings
*  46    06/09/2004  APL      Device variant support now moved to zl5011xInit.c
*  47    28/01/2005  MRC      Added mask for the GPIO write functions
*  48    15/07/2005  APL      Changed comment for zl5011xAdmGpioRead
*  49    15/07/2005  APL      Changed parameter name zl5011xAdmGpioRead
*
*******************************************************************************/


/*****************   INCLUDE FILES   ******************************************/
#include "zl5011x.h"
#include "zl5011xAdmMap.h"
#include "zl5011xAdm.h"
#include "zl5011xRdWr.h"
#include "zl5011xUtilLib.h"

/*******************************************************************************
 Function:
    zl5011xAdmInit

 Description:
   Returns chip ID and state of the 16 bootstrap pins.

 Inputs:
   zl5011xParams   Pointer to the structure for this device instance

 Outputs:
   None

 Returns:
  zlStatusE

 Remarks:
   None
*******************************************************************************/
zlStatusE  zl5011xAdmInit(zl5011xParamsS *zl5011xParams)
{

   zlStatusE status = ZL5011X_OK;
   Uint16T bootStrapMode;

   ZL5011X_TRACE(ZL5011X_ADM_FN_ID, "zl5011xAdmInit:", 0, 0, 0, 0, 0, 0);

   /* Return state of GPIO pins to device structure */
   status = zl5011xAdmGetBootStrapMode(zl5011xParams, &bootStrapMode);

   zl5011xParams->bootStrapMode = bootStrapMode;

   if(status == ZL5011X_OK)
   {
      /* disable the interrupts from the device - can be re-instated later
         when the device is attached to the interrupt handler */
      status = zl5011xAdmDisableInterrupt(zl5011xParams, ZL5011X_ENABLE_INT_0_1);
   }

   return status;
}

/*******************************************************************************
 Function:
    zl5011xAdmSetInitStatus

 Description:
   Each block is represented by a bit in the initialsation status register.
   These bits are defined as the following constants:
   ZL5011X_ADM_TFM_BIT
   ZL5011X_ADM_TFQ_BIT
   ZL5011X_ADM_PLA_BIT
   ZL5011X_ADM_RTP_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_GM_BIT
   ZL5011X_ADM_INIT_ALL_BLOCKS

 Inputs:
    zl5011xParams  Pointer to the structure for this device instance.
   blockMask      Blocks to be initialise.

 Outputs:
   None

 Returns:
   zlStatusE

 Remarks:
   None
*******************************************************************************/
zlStatusE  zl5011xAdmSetInitStatus(zl5011xParamsS *zl5011xParams,
                  Uint32T blockMask)
{
   zlStatusE status = ZL5011X_OK;

   ZL5011X_TRACE(ZL5011X_ADM_FN_ID, "zl5011xAdmSetInitStatus: %08X",
         blockMask, 0, 0, 0, 0, 0);

   if ((blockMask & ~ZL5011X_ADM_INIT_CHECK_MASK) != 0)
   {
      status = ZL5011X_PARAMETER_INVALID;
   }

   if(status == ZL5011X_OK)
   {
      status = zl5011xWrite(zl5011xParams, ZL5011X_ADM_MOD_INIT_START, blockMask);
   }

   return status;
}


/*******************************************************************************
 Function:
    zl5011xAdmGetInitStatus

 Description:
   Gets the initialisation status of each block.
   The initalisation status of each block is represented by a particular bit. A
   set bit represents an initialised block. The bits associated with each block
   are listed as the following constants:
   ZL5011X_ADM_TFM_BIT
   ZL5011X_ADM_TFQ_BIT
   ZL5011X_ADM_PLA_BIT
   ZL5011X_ADM_RTP_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_GM_BIT
   ZL5011X_ADM_INIT_ALL_BLOCKS

 Inputs:
    zl5011xParams     Pointer to the structure for this device instance.

 Outputs:
   blockInitStatus   Parameter used to return the initialisation status of
                     blocks.
 Returns:
   zlStatusE

 Remarks:
   None
*******************************************************************************/
zlStatusE  zl5011xAdmGetInitStatus(zl5011xParamsS *zl5011xParams,
                  Uint32T *blockInitStatus)
{
   zlStatusE status = ZL5011X_OK;

   ZL5011X_TRACE(ZL5011X_ADM_FN_ID, "zl5011xAdmGetInitStatus:", 0, 0, 0, 0, 0, 0);

   /* Read initialisation status of blocks and record in device structure */
   status = zl5011xRead(zl5011xParams, ZL5011X_ADM_MOD_INIT_START, blockInitStatus);

   /* Used to mask out unused bits to prevent illegal value being returned */
   *blockInitStatus &= ZL5011X_ADM_INIT_CHECK_MASK;

   ZL5011X_TRACE(ZL5011X_ADM_FN_ID, "zl5011xAdmGetInitStatus: %08X",
         *blockInitStatus, 0, 0, 0, 0, 0);

   return(status);
}

/*******************************************************************************
 Function:
   zl5011xAdmEnableBlocks

 Description:
   Writes a mask to the run register to enable the block/s.

 Inputs:
   zl5011xParams  Pointer to the structure for this device instance.
   enableBlocks  The blocks to be enabled.

 Outputs:
   None

 Returns:
   zlStatusE

 Remarks:
  Each block is enabled by writing to a particular bit in the ADM run register.
  The bits associated with each block are listed as follows:

   ZL5011X_ADM_TFM_BIT
   ZL5011X_ADM_TFQ_BIT
   ZL5011X_ADM_PLA_BIT
   ZL5011X_ADM_RTP_BIT
   ZL5011X_ADM_TIF_BIT
   ZL5011X_ADM_PAC_BIT
   ZL5011X_ADM_PKI_BIT
   ZL5011X_ADM_PKQ_BIT
   ZL5011X_ADM_PKC_BIT
   ZL5011X_ADM_PTX_BIT
   ZL5011X_ADM_PRX_BIT
   ZL5011X_ADM_GM_BIT
   ZL5011X_ADM_ENABLE_ALL_BLOCKS

*******************************************************************************/
zlStatusE zl5011xAdmEnableBlocks(zl5011xParamsS *zl5011xParams,
                 Uint32T enableBlocks)
{

   zlStatusE status = ZL5011X_OK;

   ZL5011X_TRACE(ZL5011X_ADM_FN_ID, "zl5011xAdmEnableBlocks: %08X", enableBlocks, 0, 0,
   0, 0, 0);

   if ((enableBlocks & ~ZL5011X_ADM_ENABLE_CHECK_MASK) != 0)
   {
      status = ZL5011X_PARAMETER_INVALID;
   }


   if(status == ZL5011X_OK)
   {
      /* "or" in the blocks to be initialised */
      status =  zl5011xReadModWrite(zl5011xParams, ZL5011X_ADM_MOD_RUN, enableBlocks,
                  enableBlocks);
   }

   return status;
}

/*******************************************************************************
 Function:
   zl5011xAdmResetDevice

 Description:
   Writes to the reset register to force an internal reset.

 Inputs:
   zl5011xParams   Pointer to the structure for this device instance

 Outputs:
   None

 Returns:
   zlStatusE

 Remarks:
    None
 *******************************************************************************/
zlStatusE zl5011xAdmResetDevice(zl5011xParamsS *zl5011xParams)
{

   zlStatusE status = ZL5011X_OK;

   ZL5011X_TRACE(ZL5011X_ADM_FN_ID, "zl5011xAdmResetDevice: ", 0, 0, 0, 0, 0, 0);

   status = zl5011xWrite(zl5011xParams, ZL5011X_ADM_MOD_RESET, ZL5011X_ADM_RESET_KEY);

   return status;
}
/*******************************************************************************
 Function:
   zl5011xAdmInitiateFreeze

 Description:
   This function generates a global freeze signal (debug_freeze), connected to
   all blocks which require it.

 Inputs:
   zl5011xParams   Pointer to the structure for this device instance

 Outputs:
   None

 Returns:
   zlStatusE

 Remarks:
   This function will only have any effect when the device is in debug mode.
   This is achieved by setting x_debug_enable pin active active.  This pin can
   be changed at any time to switch into or out of debug mode.
*******************************************************************************/
zlStatusE zl5011xAdmInitiateFreeze(zl5011xParamsS *zl5011xParams)
{

   zlStatusE status = ZL5011X_OK;

   ZL5011X_TRACE(ZL5011X_ADM_FN_ID, "zl5011xAdmInitiateFreeze: ", 0, 0, 0, 0, 0, 0);

   /* Write to freeze register to initiate freeze (sets bit 0) */
   status = zl5011xWrite(zl5011xParams, ZL5011X_ADM_MOD_FREEZE,
         ZL5011X_1BIT_MASK << ZL5011X_ADM_SET_FREEZE_BIT);

   return status;

}
/*******************************************************************************
 Function:
   zl5011xAdmGetFreezeState

 Description:
   Reads the Freeze register and returns TRUE if either the hardware or software
   status bits are set.  If both bits are reset then it returns FALSE.

 Inputs:
   zl5011xParams  Pointer to the structure for this device instance
   freezeState   Return parameter - gives freeze state

 Outputs:
   None

 Returns:
   zlStatusE

 Remarks:
   This function does nothing with the hardware debug enable pin.  Therefore
   it will not inform the user whether the device is actually in a freeze state.

*******************************************************************************/
zlStatusE zl5011xAdmGetFreezeState(zl5011xParamsS *zl5011xParams,
                 zl5011xBooleanE *freezeState)
{

   zlStatusE status = ZL5011X_OK;
   Uint32T   registerValue;

   ZL5011X_TRACE(ZL5011X_ADM_FN_ID, "zl5011xAdmGetFreezeState:", 0, 0, 0, 0, 0, 0);

   /* Check enumerated parameters are within range */
   status = ZL5011X_CHECK_BOOLEAN(*freezeState);

   /* Get freeze state register */
   if(status == ZL5011X_OK)
   {
      status = zl5011xRead(zl5011xParams, ZL5011X_ADM_MOD_FREEZE, &registerValue);
   }

   if (status == ZL5011X_OK)
   {
      if ((registerValue & (ZL5011X_1BIT_MASK  << ZL5011X_ADM_FREEZE_STATUS_BIT |
                            ZL5011X_1BIT_MASK  << ZL5011X_ADM_SET_FREEZE_BIT )) != 0)
      {
         *freezeState = ZL5011X_TRUE;
      }
      else
      {
         *freezeState = ZL5011X_FALSE;
      }
   }

   ZL5011X_TRACE(ZL5011X_ADM_FN_ID, "zl5011xAdmGetFreezeState: %d",
         *freezeState, 0, 0, 0, 0, 0);

   return status;
}

/*******************************************************************************
 Function:
   zl5011xAdmEnableInterruptSource

 Description:
   Enables the source of the interrupt to be directed to the selected interrupt.
   First clear the interrupts before enabling.

 Inputs:
   zl5011xParams          Pointer to the structure for this device instance
   interrupt             Which interrupt to enable (IE0, IE1 or freeze)
   interruptSourceMask   Defines the interrupt source (see remarks below)

 Outputs:
   None

 Returns:
   zlStatusE

 Remarks:
   The possible sources of the interrupts are contained in the file
   zl5011x.h

*******************************************************************************/

zlStatusE zl5011xAdmEnableInterruptSource(zl5011xParamsS *zl5011xParams,
      zl5011xInterruptValueE interrupt, Uint32T interruptSourceMask)
{
   zlStatusE status = ZL5011X_OK;
   Uint32T temp, readValue;

   ZL5011X_TRACE(ZL5011X_ADM_FN_ID, "zl5011xAdmEnableInterruptSource: interrupt %d, mask %08X",
         interrupt, interruptSourceMask, 0, 0, 0, 0);

   if(status == ZL5011X_OK)
   {
      /* Check interrupt has valid value */
      status = ZL5011X_CHECK_INTERRUPT_VALUE(interrupt);
   }

   if(status == ZL5011X_OK)
   {
      switch(interrupt)
      {
         case(ZL5011X_INTERRUPT_ZERO):
            temp = ZL5011X_ADM_MOD_IE0;
            break;

         case(ZL5011X_INTERRUPT_ONE):
            temp = ZL5011X_ADM_MOD_IE1;
            break;

         case(ZL5011X_INTERRUPT_FROZEN):
            temp = ZL5011X_ADM_MOD_FREEZE;
            break;

         default:
            temp = 0;
            status = ZL5011X_PARAMETER_INVALID; /* Do nothing */
            break;
      }
   }

   if (status == ZL5011X_OK)
   {
      (void)zl5011xHostInterruptDisable();

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色国产综合视频| 亚洲色图另类专区| 一色桃子久久精品亚洲| 亚洲va在线va天堂| 成人不卡免费av| 欧美日韩免费高清一区色橹橹 | 麻豆免费看一区二区三区| 国产精品一卡二卡在线观看| 欧美色窝79yyyycom| 国产视频在线观看一区二区三区| 亚洲成人自拍一区| 99国产精品久久久久久久久久| 51精品国自产在线| 一区二区三区鲁丝不卡| 成人小视频在线观看| 欧美v日韩v国产v| 亚洲国产精品一区二区久久| 国产91富婆露脸刺激对白| 日韩精品一区二区三区视频| 亚洲成av人**亚洲成av**| 欧洲在线/亚洲| 亚洲激情图片一区| 99国产精品99久久久久久| 国产午夜一区二区三区| 国产一区美女在线| 精品国产人成亚洲区| 久久97超碰色| 欧美大片拔萝卜| 另类小说视频一区二区| 日韩一区二区麻豆国产| 蜜臀国产一区二区三区在线播放| 欧美色爱综合网| 亚洲国产精品精华液网站| 欧美主播一区二区三区| 亚洲综合色噜噜狠狠| 日本精品裸体写真集在线观看| 国产精品福利影院| 91视频观看视频| 亚洲精品福利视频网站| 欧美性受xxxx黑人xyx| 亚洲福利一二三区| 日韩美女视频一区二区在线观看| 日韩av一区二| 国产亚洲综合性久久久影院| 国产成人自拍网| 亚洲人成在线播放网站岛国| 在线观看日韩高清av| 午夜精品久久久久久| 欧美一个色资源| 国产成人综合精品三级| 自拍偷在线精品自拍偷无码专区| 欧美在线观看你懂的| 婷婷激情综合网| 精品国内片67194| 波波电影院一区二区三区| 艳妇臀荡乳欲伦亚洲一区| 欧美日韩高清一区二区| 国内精品第一页| 中文字幕亚洲精品在线观看 | 韩国成人福利片在线播放| 国产日韩三级在线| 欧美三级在线视频| 美腿丝袜亚洲一区| 自拍偷拍国产亚洲| 日韩免费高清av| 色8久久人人97超碰香蕉987| 日本特黄久久久高潮| 久久精品欧美一区二区三区麻豆| 色妞www精品视频| 韩国女主播一区二区三区| 中文字幕在线免费不卡| 欧美丰满美乳xxx高潮www| 国产成人免费在线观看| 亚洲成人在线免费| 中文在线一区二区| 欧美精品日韩精品| 白白色 亚洲乱淫| 丝袜美腿亚洲一区| 中文字幕一区二区5566日韩| 91精品黄色片免费大全| av午夜精品一区二区三区| 日本成人在线不卡视频| 亚洲天堂免费看| 26uuu久久天堂性欧美| 在线观看亚洲成人| 99精品视频一区二区三区| 久久精品国产澳门| 亚洲成人激情综合网| 国产精品免费观看视频| 精品国产一区二区三区久久久蜜月 | 国产精品一区2区| 日本网站在线观看一区二区三区| 亚洲男同性视频| 国产日韩精品一区二区浪潮av| 欧美日韩免费电影| 欧美亚洲丝袜传媒另类| 99国产精品久| av在线不卡电影| 成人短视频下载| 成人午夜视频福利| 国产麻豆欧美日韩一区| 久久99日本精品| 奇米一区二区三区| 日韩精品亚洲一区| 亚洲风情在线资源站| 亚洲综合另类小说| 一区二区激情小说| 亚洲精品欧美专区| 欧美aa在线视频| 一区二区高清在线| 亚洲免费观看高清完整版在线 | 日韩你懂的在线观看| 欧美一三区三区四区免费在线看| 欧美三级日韩三级| 欧美日韩国产首页| 欧美高清一级片在线| 在线播放视频一区| 在线不卡中文字幕| 日韩一级免费观看| 欧美成人免费网站| 国产午夜精品一区二区三区视频 | 91精品国产综合久久福利| 欧美视频中文一区二区三区在线观看| 91色porny在线视频| 色婷婷激情久久| 欧美三级电影网站| 91精品国产入口| 久久一区二区三区国产精品| 国产欧美精品一区二区色综合| 国产视频一区在线播放| 中文字幕一区av| 天天操天天干天天综合网| 久久精品久久久精品美女| 狠狠网亚洲精品| 99久久精品免费| 精品视频一区三区九区| 日韩小视频在线观看专区| 欧美videossexotv100| 国产精品欧美一区喷水| 亚洲精品国产成人久久av盗摄| 婷婷综合五月天| 国产99久久久国产精品潘金| 色婷婷亚洲精品| 日韩免费电影一区| 亚洲欧洲精品一区二区三区 | 777欧美精品| 国产欧美日韩精品a在线观看| 国产精品久99| 日韩国产成人精品| 大胆亚洲人体视频| 777精品伊人久久久久大香线蕉| 久久婷婷国产综合国色天香| 亚洲人成精品久久久久| 免费成人性网站| 91视频在线看| www一区二区| 图片区小说区国产精品视频| 成人综合婷婷国产精品久久免费| 欧美亚洲图片小说| 中文字幕一区二区三区在线不卡| 亚洲成a人片在线观看中文| 国产成人免费在线视频| 8x8x8国产精品| 亚洲欧美日韩成人高清在线一区| 日本在线播放一区二区三区| 成人av网站在线| 久久人人超碰精品| 天堂成人国产精品一区| 97久久超碰精品国产| 久久精品一区二区三区四区| 首页亚洲欧美制服丝腿| 99久久婷婷国产精品综合| 精品久久久久久无| 五月天激情综合| 在线亚洲精品福利网址导航| 国产色产综合色产在线视频| 日韩高清电影一区| 欧美麻豆精品久久久久久| 亚洲欧美日本在线| www.亚洲国产| 久久精品一区二区三区不卡牛牛| 日韩电影免费在线看| 欧美自拍丝袜亚洲| 亚洲激情网站免费观看| 99久久er热在这里只有精品15| 久久久久久久久蜜桃| 久久精品国产亚洲5555| 欧美丰满少妇xxxbbb| 爽爽淫人综合网网站| 色呦呦国产精品| 亚洲人精品午夜| 色综合天天做天天爱| 中文字幕字幕中文在线中不卡视频| 精品在线一区二区| www久久精品| 九一九一国产精品| 精品欧美一区二区三区精品久久| 日韩高清中文字幕一区| 欧美一区二区三区免费视频| 日韩黄色一级片|