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

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? zl5011xinit.c

?? Zalink50114----TDMoIP芯片驅(qū)動(dòng)源碼
?? C
?? 第 1 頁(yè) / 共 5 頁(yè)
字號(hào):
/*******************************************************************************
*
*  File name:              zl5011xInit.c
*
*  Version:                55
*
*  Author:                 MRC
*
*  Date created:           01/05/2002
*
*  Copyright 2002, 2003, 2004, 2005, Zarlink Semiconductor Limited.
*  All rights reserved.
*
*  Module Description:
*
*  This file contains the functions required to initialise the device.
*
*  Revision History:
*
*  Rev:  Date:       Author:  Comments:
*  1     01/05/2002  MRC      Creation
*  2     02/05/2002  MRC      Update
*  3     03/05/2002  MRC      Changed the test harness prefix to hrn_
*  4     07/05/2002  MRC      Changed enum to use uppercase
*                             P(acketTxHeaderModeE).
*  5     09/05/2002  MRC      Added VerInit structure init fn
*  6     14/05/2002  MRC      Tidied up if statements.
*  7     21/05/2002  MRC      Initialise the PKQ to avoid sim warnings
*  8     28/05/2002  MRC      Added in PKC initialisation
*  9     28/05/2002  MRC      Mods following seminar
*  10    31/05/2002  MRC      Added in real admin block functions
*  11    06/06/2002  MRC      Added in PKQ and RTP init functions
*  12    14/06/2002  MRC      Brought more options out to the verInit fn
*  13    19/06/2002  MRC      PTX block changed
*  14    20/06/2002  MRC      moved run for PTX block to Lan int fn
*  15    20/06/2002  MRC      added in PTX memory initialisation for the system
*                             verification
*  16    09/07/2002  MRC      Wan init now includes the liu frequency
*  17    11/07/2002  WD       Changed default granule address.
*  18    18/07/2002  MRC      Changed memory configuration
*  19    01/08/2002  MRC      Added RTP statistics interrupt config to LanInit
*  20    16/08/2002  MRC      RTP headers and stats no longer use external mem
*  21    09/09/2002  MRC      Tidied up ready for review
*  22    10/09/2002  MRC      Updated following review
*  23    19/09/2002  MRC      Added Wan Tx max granule usage to WanInit
*  24    23/09/2002  MRC      Added SysInit function
*  25    11/10/2002  MRC      Changed RTP interrupt period - due to the way the
*                             RTP statistics operate
*  26    22/10/2002  MRC      Added Lan port initialisation
*  27    29/10/2002  MRC      Added parameter checking
*  28    31/10/2002  MRC      Added variants + minor fixes
*  29    19/11/2002  MRC      Fixed gotDevice checks
*  30    09/12/2002  MRC      Now sets the run bit for the TM block
*  31    29/01/2003  MRC      Added control for external memory parity
*  32    31/01/2003  MRC      Added extra initialisation functions for PRX
*  33    17/02/2003  MRC      Fixed granule problem in PRX initialisation
*  34    26/02/2003  MRC      Added packet loopback function
*  35    27/05/2003  MRC      Delayed run on TIF block until Wan configuration
*                             is completed (WanConfigureSync/WanConfigureAsync)
*  36    05/06/2003  MRC      Fixed packet loopback function
*  37    11/06/2003  MRC      Increased the default number of granules for the
*                             TDM queues
*  38    03/07/2003  MRC      Updated structure comments
*  39    10/07/2003  APL      Fixed compiler warning about unused static functions
*  40    10/07/2003  APL      Corrected revision number on last version
*  41    17/07/2003  APL      Trace flag was incorrect in ...StructInit function
*  42    04/08/2003  APL      Removed unused variable for some device variants
*  43    07/08/2003  APL      Don't enable run bits which are unused for the ZL50130
*  44    08/09/2003  APL      Added comment
*  45    26/07/2004  MRC      Fixed some compiler warnings
*  46    19/08/2004  MRC      Added user defined LIU frequency setting
*  47    06/09/2004  APL      Added support for different device variants
*  48    04/10/2004  APL      Additional comment for device type field
*  49    09/12/2004  MRC      Added extra device variants
*  50    03/02/2005  APL      Added ZL30301 and ZL30302 device variants
*  51    03/02/2005  APL      Renamed device ID's to allow new family members
*  52    03/02/2005  APL      Added further device variant code
*  53    14/02/2005  APL      Removed spurious comment character
*  54    11/04/2005  APL      Clear initialisation interrupt when complete
*  55    08/06/2005  MRC      Configure memory now calculates number of granules
*
*******************************************************************************/

/*****************   INCLUDE FILES                *****************************/

#include "zl5011xApi.h"
#include "zl5011xAdmMap.h"
#include "zl5011xMisc.h"
#include "zl5011xInit.h"
#include "zl5011xRtpMap.h"
#include "zl5011xLan.h"
#include "zl5011xPacketLoopback.h"
#include "zl5011xVariant.h"

/*****************   STATIC FUNCTION DECLARATIONS   ***************************/

static zlStatusE zl5011xCheckAPICompatibility(zlDeviceTypeE deviceType);
static zlStatusE zl5011xInitBlocks(zl5011xParamsS *zl5011xParams, Uint32T blocks);
static zlStatusE zl5011xSendPrxPackets(zl5011xParamsS *zl5011xParams, Uint32T grn1, Uint32T grn2);
static zlStatusE zl5011xPreparePrxGranules(zl5011xParamsS *zl5011xParams, Uint32T *grn1, Uint32T *grn2);
static zlStatusE zl5011xMemoryCalcAddrGranulesMax(zl5011xParamsS *zl5011xParams, zl5011xConfigureMemoryS *par,
      Uint32T *descBase, Uint32T *dataBase, Uint32T *heapStartAddress, Uint32T *heapEndAddress, Uint32T *numGranules);
static zlStatusE zl5011xMemoryCalcAddrGranules(zl5011xParamsS *zl5011xParams, zl5011xConfigureMemoryS *par,
      Uint32T *descBase, Uint32T *dataBase, Uint32T *heapStartAddress, Uint32T *heapEndAddress);

/*****************   EXPORTED FUNCTION DEFINTIONS   ***************************/

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

 Function:
    zl5011xSysInitStructInit

 Description:
   Initialises structure used by zl5011xSysInit function.

 Inputs:
   zl5011xParams   Pointer to the structure for this device instance
   par            Pointer to the structure for configuration items.
                  See main function

 Returns:
   zlStatusE

 Remarks:
    None

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

zlStatusE zl5011xSysInitStructInit(zl5011xParamsS *zl5011xParams, zl5011xSysInitS *par)
{
   zlStatusE status = ZL5011X_OK;

   if (status == ZL5011X_OK)
   {
      ZL5011X_TRACE(ZL5011X_INIT_FN_ID,
            "zl5011xSysInitStructInit:",
            0, 0, 0, 0, 0, 0);

      par->osExclusionEnable = ZL5011X_TRUE;
   }

   if (status == ZL5011X_OK)
   {
      status = zl5011xInitStructInit(zl5011xParams, &(par->init));
      par->init.osExclusionEnable = ZL5011X_FALSE;
   }

   if (status == ZL5011X_OK)
   {
      status = zl5011xConfigureMemoryStructInit(zl5011xParams, &(par->configureMemory));
      par->configureMemory.osExclusionEnable = ZL5011X_FALSE;
   }

   if (status == ZL5011X_OK)
   {
      status = zl5011xWanInitStructInit(zl5011xParams, &(par->wanInit));
      par->wanInit.osExclusionEnable = ZL5011X_FALSE;
   }

   if (status == ZL5011X_OK)
   {
      status = zl5011xLanInitStructInit(zl5011xParams, &(par->lanInit));
      par->lanInit.osExclusionEnable = ZL5011X_FALSE;
   }

   if (status == ZL5011X_OK)
   {
      status = zl5011xRunStructInit(zl5011xParams, &(par->run));
      par->run.osExclusionEnable = ZL5011X_FALSE;
   }

   return status;
}

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

 Function:
    zl5011xSysInit

 Description:
   This performs a complete initialisation of the device, and provides a
   convenient way of initialising each of the functional areas in the device
   from a single function call.

 Inputs:
   zl5011xParams   Pointer to the structure for this device instance
   par            Pointer to the structure for configuration items. See below:

 Structure inputs:
   init           settings for the general init function
   configureMemory   settings for the memory initialisation function
   wanInit        settings for the WAN init function
   lanInit        settings for the LAN init function
   run            settings for the run function
   osExclusionEnable ZL5011X_TRUE to enable OS exclusion

 Structure outputs:
   None

 Returns:
   zlStatusE

 Remarks:
   None

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

zlStatusE zl5011xSysInit(zl5011xParamsS *zl5011xParams, zl5011xSysInitS *par)
{
   zlStatusE status = ZL5011X_OK;
   zl5011xBooleanE gotDevice = ZL5011X_FALSE;

      Uint32T grn1, grn2;
      zl5011xResetS reset;

   /* do some parameter checking */
   status = ZL5011X_CHECK_POINTERS(zl5011xParams, par);

   if ((status == ZL5011X_OK) && (par->osExclusionEnable == ZL5011X_TRUE))
   {
      /* get access to the device */
      status = zl5011xGetDevice(zl5011xParams, ZL5011X_GET_DEVICE_TIMEOUT_MODE);

      if (status == ZL5011X_OK)
      {
         gotDevice = ZL5011X_TRUE;
      }
   }

   /* main function code starts */

   if (status == ZL5011X_OK)
   {
      ZL5011X_TRACE(ZL5011X_INIT_FN_ID,
            "zl5011xSysInit: ",
            0, 0, 0, 0, 0, 0);
   }

   if (status == ZL5011X_OK)
   {
      status = zl5011xInit(zl5011xParams, &(par->init));
   }

   if (status == ZL5011X_OK)
   {
      status = zl5011xConfigureMemory(zl5011xParams, &(par->configureMemory));
   }

      if (status == ZL5011X_OK)
      {
         if (zl5011xParams->doneInit == ZL5011X_FALSE)
         {
            status = zl5011xPreparePrxGranules(zl5011xParams, &grn1, &grn2);
         }
      }

   if (status == ZL5011X_OK)
   {
      status = zl5011xWanInit(zl5011xParams, &(par->wanInit));
   }

   if (status == ZL5011X_OK)
   {
      status = zl5011xLanInit(zl5011xParams, &(par->lanInit));
   }

   if (status == ZL5011X_OK)
   {
      status = zl5011xRun(zl5011xParams, &(par->run));
   }

   if (gotDevice == ZL5011X_TRUE)
   {
      if (status == ZL5011X_OK)
      {
         status = zl5011xReleaseDevice(zl5011xParams);
      }
      else
      {
         /* already have an error code, so don't overwrite it */
         (void)zl5011xReleaseDevice(zl5011xParams);
      }
   }

      if (zl5011xParams->doneInit == ZL5011X_FALSE)
      {
         if (status == ZL5011X_OK)
         {
            status = zl5011xSendPrxPackets(zl5011xParams, grn1, grn2);
         }

         if (status == ZL5011X_OK)
         {
            status = zl5011xResetStructInit(zl5011xParams, &reset);
         }

         if (status == ZL5011X_OK)
         {
            status = zl5011xReset(zl5011xParams, &reset);
         }

         if (status == ZL5011X_OK)
         {
            zl5011xParams->doneInit = ZL5011X_TRUE;

            status = zl5011xSysInit(zl5011xParams, par);
         }
      }

   return status;
}

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

 Function:
    zl5011xInitStructInit

 Description:
   Initialises structure used by zl5011xInit function.

 Inputs:
   zl5011xParams   Pointer to the structure for this device instance
   par            Pointer to the structure for configuration items.
                  See main function

 Returns:
   zlStatusE

 Remarks:
    None

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

zlStatusE zl5011xInitStructInit(zl5011xParamsS *zl5011xParams, zl5011xInitS *par)
{
   zlStatusE status = ZL5011X_OK;

   if (status == ZL5011X_OK)
   {
      ZL5011X_TRACE(ZL5011X_INIT_FN_ID, "zl5011xInitStructInit: ", 0, 0, 0, 0, 0, 0);

      par->deviceType = (zlDeviceTypeE)ZL5011X_NOT_INITIALISED; /* This MUST be set by the calling application */
      par->systemClockFreq = 100000000;
      par->osExclusionEnable = ZL5011X_TRUE;
   }

   return status;
}

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

 Function:
    zl5011xInit

 Description:
   This function sets up the more general functional blocks within the device.

   There are several functions used to configure the device from reset. They
   are shown below, and must be called in this sequence, in order to enable the
   device.
      zl5011xInit
      zl5011xConfigureMemory
      zl5011xWanInit
      zl5011xLanInit
      zl5011xRun

 Inputs:
   zl5011xParams   Pointer to the structure for this device instance
   par            Pointer to the structure for configuration items. See below:

 Structure inputs:
   deviceType        The particular type of device we are running on.
                     This MUST be specified or an error will be generated.
   systemClockFreq   frequency the device is being clocked at.
   osExclusionEnable ZL5011X_TRUE to enable OS exclusion

 Structure outputs:
   None

 Returns:
   zlStatusE

 Remarks:
   None

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

zlStatusE zl5011xInit(zl5011xParamsS *zl5011xParams, zl5011xInitS *par)
{
   zlStatusE status = ZL5011X_OK;
   Uint32T loop;
   zl5011xBooleanE gotDevice = ZL5011X_FALSE;

   /* do some parameter checking */
   status = ZL5011X_CHECK_POINTERS(zl5011xParams, par);

   if (status == ZL5011X_OK)
   {  /* Check that a valid device type has been specified */
      status = ZL5011X_CHECK_DEVICE_TYPE(par->deviceType);
   }

   if (status == ZL5011X_OK)
   {
      status = zl5011xCheckAPICompatibility(par->deviceType);
   }

   if ((status == ZL5011X_OK) && (par->osExclusionEnable == ZL5011X_TRUE))
   {
      /* get access to the device */
      status = zl5011xGetDevice(zl5011xParams, ZL5011X_GET_DEVICE_TIMEOUT_MODE);

      if (status == ZL5011X_OK)
      {

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91啪九色porn原创视频在线观看| 欧美在线免费播放| 天堂成人免费av电影一区| 久久这里只有精品6| 色噜噜狠狠色综合欧洲selulu| 精品综合免费视频观看| 亚州成人在线电影| 曰韩精品一区二区| 18欧美亚洲精品| 久久精品人人做人人爽人人| 精品少妇一区二区三区| 91精品免费在线| 欧美视频一区在线观看| 欧美手机在线视频| 在线视频欧美精品| 色久综合一二码| 91麻豆精东视频| 95精品视频在线| 99麻豆久久久国产精品免费优播| 国产成人在线电影| 高清不卡在线观看| 高清在线不卡av| www.99精品| av网站免费线看精品| 9人人澡人人爽人人精品| 成人黄色国产精品网站大全在线免费观看| 婷婷成人综合网| 午夜精品久久久久影视| 亚洲成精国产精品女| 亚洲va欧美va天堂v国产综合| 有坂深雪av一区二区精品| 国产精品毛片大码女人| 国产精品福利一区二区| 亚洲欧美影音先锋| 一区二区在线看| 午夜精品久久久久久久99樱桃| 日韩成人一级大片| 激情综合色丁香一区二区| 精品亚洲porn| 成人教育av在线| 成人一二三区视频| 91免费国产视频网站| 在线视频欧美精品| 日韩精品一区二区三区swag| 91精品国产一区二区人妖| 欧美三级视频在线观看| 欧美一区二区在线不卡| 久久综合久久鬼色| 中文字幕一区在线观看| 亚洲综合久久久| 美女视频黄免费的久久 | 另类小说图片综合网| 国产又粗又猛又爽又黄91精品| 国产成人精品免费网站| 粗大黑人巨茎大战欧美成人| 成人福利视频网站| 在线视频你懂得一区二区三区| 911精品产国品一二三产区 | 一区二区三区不卡视频在线观看 | 狠狠网亚洲精品| 成人高清av在线| 欧美美女黄视频| 欧美精品一区二区三区在线播放| wwww国产精品欧美| 亚洲欧美自拍偷拍色图| 日本欧美在线看| av综合在线播放| 欧美一区二区三区精品| 国产精品美女久久久久aⅴ国产馆| 亚洲一二三区视频在线观看| 久久91精品久久久久久秒播| 不卡视频在线观看| 欧美一级欧美三级| 久久先锋影音av| 最新高清无码专区| 亚洲18女电影在线观看| 成人晚上爱看视频| 宅男在线国产精品| 亚洲欧美日韩国产另类专区| 免费成人av在线| 91视视频在线观看入口直接观看www | 亚洲猫色日本管| 日本伊人午夜精品| 色偷偷久久一区二区三区| 欧美成人激情免费网| 亚洲欧美成人一区二区三区| 精品一区二区三区免费| 色哟哟在线观看一区二区三区| 欧美刺激午夜性久久久久久久| 亚洲欧美日韩系列| 高清不卡一区二区在线| 日韩欧美一级二级三级| 亚洲成年人影院| 国产91精品露脸国语对白| 欧美在线短视频| 国产精品每日更新| 国产高清无密码一区二区三区| 制服丝袜亚洲色图| 亚洲综合在线免费观看| 国产成人av一区二区三区在线| 欧美精品少妇一区二区三区| 亚洲综合在线视频| 99精品视频一区| 久久综合一区二区| 亚洲第一在线综合网站| 成人av网站在线| 中文字幕欧美三区| 国产高清一区日本| 久久久亚洲精华液精华液精华液| 日日欢夜夜爽一区| 欧美日韩一二三区| 一区二区三区国产| 欧洲av一区二区嗯嗯嗯啊| 久久麻豆一区二区| 日本视频免费一区| 日韩欧美亚洲一区二区| 日本午夜精品一区二区三区电影| 欧美午夜精品久久久久久超碰| 亚洲精品国产视频| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 亚洲国产另类av| 欧美性生活影院| 亚洲综合色噜噜狠狠| 成人成人成人在线视频| 欧美激情一区二区三区蜜桃视频| 日韩精品亚洲一区二区三区免费| 色伊人久久综合中文字幕| 亚洲色图视频网| 一本久久a久久精品亚洲| 1区2区3区精品视频| 91久久精品一区二区三| 一区二区国产视频| 欧美男生操女生| 男女男精品网站| 精品国产一区二区三区久久久蜜月| 日韩高清在线观看| 欧美电影一区二区| 人人狠狠综合久久亚洲| 精品福利一二区| 国产乱码精品一区二区三区五月婷| 国产婷婷一区二区| 99精品欧美一区二区三区综合在线| 国产亚洲欧美中文| 成人高清免费在线播放| 亚洲自拍偷拍综合| 欧美一级国产精品| 国产精品自在在线| 亚洲综合色在线| 欧美怡红院视频| 亚洲免费观看高清完整| 日本精品裸体写真集在线观看 | 成人免费福利片| 国产精品不卡一区二区三区| 欧美男男青年gay1069videost | 日本道精品一区二区三区| 日韩和欧美一区二区| 久久免费看少妇高潮| 在线精品国精品国产尤物884a| 蜜臀av一级做a爰片久久| 国产精品―色哟哟| 欧美日韩免费在线视频| 国产v综合v亚洲欧| 亚洲国产精品一区二区久久| 久久久久久久精| 欧美日本在线一区| 91一区二区在线| 国内成人免费视频| 日韩精品成人一区二区在线| 一色屋精品亚洲香蕉网站| 日韩一级片在线播放| 在线视频国内一区二区| 国产精品影视网| 日本成人在线不卡视频| 亚洲欧美日韩一区二区三区在线观看| 欧美mv日韩mv国产网站| 欧美在线综合视频| 成人app软件下载大全免费| 麻豆91精品91久久久的内涵| 亚洲综合999| 亚洲天堂免费看| 国产日韩欧美精品在线| 日韩一级免费一区| 欧美美女激情18p| 欧美专区在线观看一区| 91污片在线观看| 亚洲天堂a在线| 国产婷婷精品av在线| 777xxx欧美| 欧美日韩不卡一区| 欧美日韩一区二区欧美激情| 在线综合视频播放| 欧美综合在线视频| 91成人网在线| 91麻豆视频网站| 99精品视频在线观看免费| 国产大陆a不卡| 国产一区二区影院| 精品一区二区av| 国产在线精品视频| 国产精品综合网|