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

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

?? zl5011xinit.c

?? Zalink50114----TDMoIP芯片驅動源碼
?? C
?? 第 1 頁 / 共 5 頁
字號:
/*******************************************************************************
*
*  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)
      {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧洲99久久| 国产精品综合一区二区| 日本不卡一二三| 成人黄色av电影| 日韩欧美专区在线| 亚洲精品欧美激情| 国产东北露脸精品视频| 欧美剧情片在线观看| 综合久久一区二区三区| 国产精品正在播放| 精品国产欧美一区二区| 亚洲已满18点击进入久久| 国产91露脸合集magnet| 日韩精品一区二| 日本成人在线不卡视频| 精品视频在线视频| 亚洲精选视频免费看| 成人av午夜电影| 国产视频视频一区| 国产成人精品免费网站| 精品久久人人做人人爰| 秋霞av亚洲一区二区三| 欧美日韩一区二区三区不卡| 亚洲日本va在线观看| 高清不卡一区二区在线| 久久久久久久久久电影| 激情av综合网| 久久蜜桃av一区精品变态类天堂| 日韩成人精品视频| 欧美一区二区高清| 日韩电影在线免费看| 欧美精品一二三四| 日韩高清不卡一区| 91精品国产色综合久久不卡蜜臀| 午夜精品影院在线观看| 欧美日韩激情一区二区三区| 亚洲一二三级电影| 777a∨成人精品桃花网| 免费在线观看不卡| 久久奇米777| 成人午夜激情在线| 一区二区在线观看免费视频播放| 91视频国产资源| 一区二区三区蜜桃网| 欧美日韩视频在线观看一区二区三区 | 日韩女优毛片在线| 理论电影国产精品| 亚洲精品在线三区| 成人精品视频一区二区三区| 国产精品不卡在线| 在线观看日韩高清av| 婷婷久久综合九色综合绿巨人 | 国产成人丝袜美腿| 日韩美女精品在线| 欧美日韩不卡一区| 精品一区二区三区久久久| 久久影院电视剧免费观看| 风间由美一区二区av101| 亚洲丝袜自拍清纯另类| 欧美日韩午夜影院| 黑人巨大精品欧美黑白配亚洲| 日本一区二区在线不卡| 91成人免费在线视频| 热久久一区二区| 国产精品麻豆网站| 这里是久久伊人| 成人一级片在线观看| 亚洲成av人片一区二区梦乃| 亚洲精品一线二线三线无人区| 高清不卡一区二区在线| 视频一区二区三区中文字幕| 2024国产精品| 欧美亚洲国产bt| 国产精品一区二区三区四区| 亚洲一区二区高清| 国产欧美一区二区精品忘忧草| 在线观看不卡视频| 国产高清精品久久久久| 舔着乳尖日韩一区| 国产精品的网站| 欧美v国产在线一区二区三区| jizzjizzjizz欧美| 精品亚洲成a人在线观看| 亚洲国产精品久久人人爱| 久久精品视频一区| 91精品国产综合久久精品图片| 成人激情免费视频| 狠狠色伊人亚洲综合成人| 亚洲福中文字幕伊人影院| 国产精品国产三级国产普通话三级 | 欧美tickle裸体挠脚心vk| 91国内精品野花午夜精品| 国产精品自产自拍| 婷婷国产在线综合| 亚洲一线二线三线久久久| 国产日韩精品一区二区浪潮av| 91精品国产欧美日韩| 欧美日韩亚洲另类| 欧美性猛交xxxxxx富婆| 99re这里只有精品首页| 国产成人自拍高清视频在线免费播放| 视频精品一区二区| 图片区小说区国产精品视频| 樱桃国产成人精品视频| 亚洲人成网站精品片在线观看 | 一区二区三区**美女毛片| 中文字幕免费观看一区| 久久久综合九色合综国产精品| 日韩三级视频在线看| 欧美久久久久久久久中文字幕| 91福利视频在线| 欧美亚男人的天堂| 在线精品视频一区二区| 91成人免费网站| 欧美日韩免费观看一区三区| 欧美性一区二区| 91国偷自产一区二区开放时间 | 亚洲免费观看高清完整| 亚洲视频 欧洲视频| 亚洲欧美日韩国产另类专区| 一区视频在线播放| 亚洲精选一二三| 亚洲成人一区在线| 秋霞午夜av一区二区三区| 免费成人在线视频观看| 久久疯狂做爰流白浆xx| 国产精品羞羞答答xxdd| 成人av网址在线观看| 日本韩国一区二区三区| 9191成人精品久久| 依依成人综合视频| 午夜国产不卡在线观看视频| 日本不卡一区二区| 国产精品一区二区三区乱码| 国产成人av电影免费在线观看| 成人小视频免费在线观看| 97se亚洲国产综合自在线不卡| 色综合色综合色综合色综合色综合 | 久久99精品久久久久久久久久久久| 国产一区在线视频| 91视频com| 日韩一级成人av| 欧美激情艳妇裸体舞| 亚洲专区一二三| 毛片一区二区三区| 不卡高清视频专区| 88在线观看91蜜桃国自产| 久久久噜噜噜久噜久久综合| 亚洲品质自拍视频| 免费在线观看视频一区| a在线欧美一区| 91精品免费在线观看| 日本一区二区三区在线观看| 亚洲一区国产视频| 国产福利精品导航| 欧美视频一区二区| 国产欧美一区二区三区鸳鸯浴 | 欧美激情一区二区三区蜜桃视频| 亚洲黄网站在线观看| 国产最新精品免费| 欧美体内she精高潮| 欧美极品少妇xxxxⅹ高跟鞋| 香蕉影视欧美成人| 成人毛片视频在线观看| 日韩欧美一级二级三级久久久| 国产精品护士白丝一区av| 美女视频黄a大片欧美| 91浏览器在线视频| 久久亚区不卡日本| 午夜激情一区二区三区| 99久久精品免费| 久久夜色精品国产欧美乱极品| 石原莉奈在线亚洲三区| 色老综合老女人久久久| 中文幕一区二区三区久久蜜桃| 日本不卡视频一二三区| 国产网站一区二区三区| 日韩精品亚洲一区二区三区免费| 96av麻豆蜜桃一区二区| 国产香蕉久久精品综合网| 久久电影网站中文字幕| 欧美精品18+| 亚洲曰韩产成在线| 色综合天天综合在线视频| 国产精品嫩草久久久久| 国产精品一区久久久久| 久久免费看少妇高潮| 久久91精品久久久久久秒播| 欧美精品v国产精品v日韩精品| 一区二区三区欧美日| 在线亚洲一区二区| 亚洲一区二区三区在线| 色综合天天综合网天天狠天天| 中文字幕制服丝袜一区二区三区| 国产精品影音先锋| 国产日本欧美一区二区| 国产·精品毛片| 国产精品私房写真福利视频| 成人福利在线看| 国产精品传媒视频|