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

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

?? zl5011xtif.c

?? Zalink50114----TDMoIP芯片驅動源碼
?? C
?? 第 1 頁 / 共 4 頁
字號:
/*******************************************************************************
*
*  File name:              zl5011xTif.c
*
*  Version:                33
*
*  Author:                 MRC
*
*  Date created:           08/02/2002
*
*  Copyright 2002, 2003, 2004, 2005, Zarlink Semiconductor Limited.
*  All rights reserved.
*
*  Module Description:
*
*  This file contains all the functions that are used to control the TDM
*  interface part of the device.
*     Sets clock polarities and general operating mode.
*
*  Revision History:
*
*  Rev:  Date:       Author:  Comments:
*  1     08/02/2002  MRC      Creation
*  2     15/02/2002  MRC      Pass device structure to read / write fns
*  3     28/02/2002  MRC      Checked and quick test
*  4     08/03/2002  MRC      Update
*  5     19/03/2002  MRC      Update
*  6     27/03/2002  MRC      Stores settings in the device structure
*  7     27/03/2002  MRC      ReadModWrite parameter order changed.
*  8     28/03/2002  MRC      Now use 8 bit rather than 32 bit locals for
*                             stream num etc.
*  9     09/04/2002  MRC      Changes to TIF frame type block.
*  10    17/04/2002  MRC      Changed the CHECK_.. macros to ZL5011X_CHECK_..
*  11    30/04/2002  MRC      Made a fix to allow the init function to
*                             initialise all of the streams.
*  12    16/05/2002  MRC      Added channel enable function
*  13    29/05/2002  MRC      Added bit order control
*  14    31/05/2002  MRC      Added tri-state control during device init
*  15    19/06/2002  MRC      TIF now starts in DPLL slave mode (backplane)
*  16    20/06/2002  MRC      Changed interface type enum names following review
*  17    09/07/2002  MRC      Added LIU value to set interface fn and added BER
*                             functions.
*  18    26/07/2002  MRC      Fixed bit stuffing function
*  19    14/08/2002  MRC      Added control for sample point - 3/4 and x1 clock
*  20    03/10/2002  JFE      Fixed ZL5011X_TRACE without : following function name.
*  21    30/10/2002  MRC      Updated to allow variants
*  22    31/10/2002  MRC      Added variants + minor fixes
*  23    05/11/2002  MRC      Added check to ensure that streams are valid in
*                             zl5011xTifSetInterfaceType
*  24    06/11/2002  MRC      Modified check in zl5011xTifSetInterfaceType,
*                             since TDM is not valid in one of the variants
*  25    29/07/2003  APL      Renamed global wanLimits structure to devLimits
*  26    13/02/2004  APL      Updated function header descriptions for BER receiver
*  27    23/07/2004  MRC      Fixed some compiler warnings
*  28    29/07/2004  MRC      Fixed some compiler warnings
*  29    19/08/2004  MRC      Added user defined LIU frequency setting
*  30    16/11/2004  MRC      Added individual stream frequency control
*  31    21/01/2005  MRC      Updated for non CES operation
*  32    28/01/2005  MRC      Updated stream enable for non CES stream
*  33    03/02/2005  APL      Renamed device ID's to allow new family members
*
*******************************************************************************/

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

#include "zl5011x.h"
#include "zl5011xTif.h"
#include "zl5011xTifMap.h"
#include "zl5011xUtilLib.h"

/*****************   EXPORTED GLOBAL VARIABLES    *****************************/

/*****************   STATIC GLOBAL VARIABLES      *****************************/

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

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

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

 Function:
   zl5011xTifInit

 Description:
   This function initialises the device, tri-stating the TDM outputs and
   initialising the clock polarities.

 Inputs:
   zl5011xParams      Pointer to the structure for this device instance

 Outputs:
   None

 Returns:
   zlStatusE

 Remarks:
   None

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

zlStatusE zl5011xTifInit(zl5011xParamsS *zl5011xParams)
{
   Uint8T loop;
   zlStatusE status = ZL5011X_OK;

   ZL5011X_TRACE(ZL5011X_TIF_FN_ID, "zl5011xTifInit:", 0, 0, 0, 0, 0, 0);

   status = zl5011xTifControlOutputs(zl5011xParams, ZL5011X_WAN_OUTPUT_HIZ);

   if (status == ZL5011X_OK)
   {
      /* temporarily set the number of streams to the maximum, to allow the
         chip to be initialised */
      zl5011xParams->wanIf.wanNumStreams = ZL5011X_MAX_NUMBER_STREAMS;

      for (loop = 0; loop < ZL5011X_MAX_NUMBER_STREAMS; loop++)
      {
         status = zl5011xTifSetInputClockPolarity(zl5011xParams, loop, ZL5011X_NEGATIVE);
         if (status != ZL5011X_OK)
            break;

         status = zl5011xTifSetOutputClockPolarity(zl5011xParams, loop, ZL5011X_POSITIVE);
         if (status != ZL5011X_OK)
            break;
      }
   }

   if (status == ZL5011X_OK)
   {
      status =  zl5011xTifBerDisableGenerator(zl5011xParams);
   }

   if (status == ZL5011X_OK)
   {
      status =  zl5011xTifBerDisableReceiver(zl5011xParams);
   }

   /* reset the number of streams / channels that are available */
   zl5011xParams->wanIf.wanNumStreams = 0;
   zl5011xParams->wanIf.wanNumChannels = 0;

   return(status);
}

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

 Function:
   zl5011xTifControlOutputs

 Description:
   Controls the tri-state for the TDM outputs.

 Inputs:
   zl5011xParams      Pointer to the structure for this device instance
   outputState       Controls the tri-state for the TDM outputs

 Outputs:
   None

 Returns:
   zlStatusE

 Remarks:
   None

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

zlStatusE zl5011xTifControlOutputs(zl5011xParamsS *zl5011xParams,
      zl5011xWanIfOutputEnableE outputState)
{
   Uint32T bit, bitMask;
   zlStatusE status =  ZL5011X_OK;

   ZL5011X_TRACE(ZL5011X_TIF_FN_ID, "zl5011xTifControlOutputs: %d",
         outputState, 0, 0, 0, 0, 0);

   status = ZL5011X_CHECK_WAN_IF_OUTPUT_ENABLE(outputState);

   if (status == ZL5011X_OK)
   {
      bit = (Uint32T)outputState << ZL5011X_TIF_OUTPUT_ENABLE_BIT;
      bitMask = ZL5011X_1BIT_MASK << ZL5011X_TIF_OUTPUT_ENABLE_BIT;

      status = zl5011xUpdateRegisters(zl5011xParams, ZL5011X_TIF_CTRL_REG,
               &zl5011xParams->wanIf.wanIfControl, bit, bitMask);

      zl5011xParams->wanIf.outputEnable = outputState;
   }

   return(status);
}

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

 Function:
   zl5011xTifSetFramePulseType

 Description:
   Sets the frame pulse type to use for framed TDM.

 Inputs:
   zl5011xParams      Pointer to the structure for this device instance
   pulseType         Configures the frame pulse type for framed TDM.

 Outputs:
   None

 Returns:
   zlStatusE

 Remarks:
   None

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

zlStatusE zl5011xTifSetFramePulseType(zl5011xParamsS *zl5011xParams,
      zl5011xWanIfFramePulseTypeE pulseType)
{
   Uint32T bit, bitMask;
   zlStatusE status =  ZL5011X_OK;

   ZL5011X_TRACE(ZL5011X_TIF_FN_ID, "zl5011xTifSetFramePulseType: %d",
         pulseType, 0, 0, 0, 0, 0);

   status = ZL5011X_CHECK_WAN_IF_FRAME_PULSE_TYPE(pulseType);

   if (status == ZL5011X_OK)
   {
      bit =  (Uint32T)pulseType << ZL5011X_TIF_FRAME_PULSE_BITS;
      bitMask  = ZL5011X_TIF_FRAME_PULSE_MASK << ZL5011X_TIF_FRAME_PULSE_BITS;

      zl5011xParams->wanIf.framePulseWidth = pulseType;

      status = zl5011xUpdateRegisters(zl5011xParams, ZL5011X_TIF_CTRL_REG,
               &zl5011xParams->wanIf.wanIfControl, bit, bitMask);
   }

   return(status);
}

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

 Function:
   zl5011xTifSetFramePolarity

 Description:
   Sets the polarity to be used for the frame pulse.

 Inputs:
   zl5011xParams      Pointer to the structure for this device instance
   polarity          Configures the polarity of the frame pulse for framed TDM.

 Outputs:
   None

 Returns:
   zlStatusE

 Remarks:
   None

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

zlStatusE zl5011xTifSetFramePolarity(zl5011xParamsS *zl5011xParams,
      zl5011xPolarityE polarity)
{
   Uint32T bit, bitMask;
   zlStatusE status =  ZL5011X_OK;

   ZL5011X_TRACE(ZL5011X_TIF_FN_ID, "zl5011xTifSetFramePolarity: %d",
         polarity, 0, 0, 0, 0, 0);

   status = ZL5011X_CHECK_POLARITY(polarity);

   if (status == ZL5011X_OK)
   {
      bit = (Uint32T)polarity <<  ZL5011X_TIF_FRAME_POL_BIT;
      bitMask = ZL5011X_1BIT_MASK << ZL5011X_TIF_FRAME_POL_BIT;

      zl5011xParams->wanIf.framePulsePolarity = polarity;

      status = zl5011xUpdateRegisters(zl5011xParams, ZL5011X_TIF_CTRL_REG,
               &zl5011xParams->wanIf.wanIfControl, bit, bitMask);
   }

   return(status);
}

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

 Function:
   zl5011xTifSetDataSampleMode

 Description:
   Sets the sample point for Rx TDM data.

 Inputs:
   zl5011xParams      Pointer to the structure for this device instance
   sampleMode        Configures the sampling point for TDM input.

 Outputs:
   None

 Returns:
   zlStatusE

 Remarks:
   None

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

zlStatusE zl5011xTifSetDataSampleMode(zl5011xParamsS *zl5011xParams,
      zl5011xWanIfSamplePointE sampleMode)
{
   Uint32T bits, bitMask;
   zlStatusE status =  ZL5011X_OK;

   ZL5011X_TRACE(ZL5011X_TIF_FN_ID, "zl5011xTifSetDataSampleMode: %d",
         sampleMode, 0, 0, 0, 0, 0);

   status = ZL5011X_CHECK_WAN_IF_SAMPLE_POINT(sampleMode);

   if (status == ZL5011X_OK)
   {
      bits = (Uint32T)sampleMode <<  ZL5011X_TIF_SAMPLING_BITS;
      bitMask = (ZL5011X_TIF_SAMPLING_MASK << ZL5011X_TIF_SAMPLING_BITS) |
            (ZL5011X_1BIT_MASK << ZL5011X_TIF_SAMPLE_CLOCK_BIT) |
            (ZL5011X_1BIT_MASK << ZL5011X_TIF_SYSTEM_CLOCK_BIT);

      /* if setting up a 3/4 sample point and using x1 clock, then must
         set the async clocking mode */
      if ((sampleMode == ZL5011X_WAN_SAMPLE_THREE_QUARTER_BIT) &&
         (zl5011xParams->wanIf.wanClockMultiply == ZL5011X_WAN_CLK_DATA_RATE))
      {
         bits |= ZL5011X_1BIT_MASK << ZL5011X_TIF_SAMPLE_CLOCK_BIT;

         /* since the system clock is used for this approximation, need to
            set a bit to indicate the system clock frequency */
         if (zl5011xParams->systemClockFreq > ZL5011X_TIF_HIGH_SYS_CLOCK_FREQ)
         {
            bits |= ZL5011X_1BIT_MASK << ZL5011X_TIF_SYSTEM_CLOCK_BIT;
         }
      }

      status = zl5011xUpdateRegisters(zl5011xParams, ZL5011X_TIF_CTRL_REG,
               &zl5011xParams->wanIf.wanIfControl, bits, bitMask);
   }

   zl5011xParams->wanIf.wanSampleMode = sampleMode;

   return(status);
}

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

 Function:
   zl5011xTifSetClockRate

 Description:
   Sets the clock multiply bit - i.e. clock can be 1x or 2x data rate.

 Inputs:
   zl5011xParams      Pointer to the structure for this device instance
   clockRate         selects the TDM clock multiply mode

 Outputs:
   None

 Returns:
   zlStatusE

 Remarks:
   None

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

zlStatusE zl5011xTifSetClockRate(zl5011xParamsS *zl5011xParams,
      zl5011xWanIfClockRateE clockRate)
{
   Uint32T bit, bitMask;
   zlStatusE status =  ZL5011X_OK;

   ZL5011X_TRACE(ZL5011X_TIF_FN_ID, "zl5011xTifSetClockRate: %d",
         clockRate, 0, 0, 0, 0, 0);

   status = ZL5011X_CHECK_WAN_IF_CLOCK_RATE(clockRate);

   if (status == ZL5011X_OK)
   {
      bit = (Uint32T)clockRate <<  ZL5011X_TIF_CLK_MULTIPLY_BIT;
      bitMask = ZL5011X_1BIT_MASK << ZL5011X_TIF_CLK_MULTIPLY_BIT;

      status = zl5011xUpdateRegisters(zl5011xParams, ZL5011X_TIF_CTRL_REG,
               &zl5011xParams->wanIf.wanIfControl, bit, bitMask);

      zl5011xParams->wanIf.wanClockMultiply = clockRate;
   }

   return(status);
}

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

 Function:
   zl5011xTifSetDataRate

 Description:
   Sets the data rate for the TDM streams.

 Inputs:
   zl5011xParams      Pointer to the structure for this device instance
   dataRate          selects the TDM data rate

 Outputs:
   None

 Returns:
   zlStatusE

 Remarks:
   None

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩三级一区二区| 欧美日韩国产美| 亚洲va欧美va天堂v国产综合| 7777精品伊人久久久大香线蕉超级流畅| 蜜桃视频在线观看一区| 亚洲日本一区二区三区| 337p日本欧洲亚洲大胆精品| 欧美性高清videossexo| 国产aⅴ综合色| 蜜臀精品一区二区三区在线观看 | 成人激情动漫在线观看| 日韩中文字幕91| 亚洲视频狠狠干| 国产农村妇女精品| 精品福利av导航| 69堂国产成人免费视频| 色偷偷久久一区二区三区| 国产精品主播直播| 久久99精品网久久| 日韩高清欧美激情| 亚洲va天堂va国产va久| 亚洲精品美腿丝袜| 国产精品久久久久久久久图文区 | 亚洲人精品午夜| 国产亚洲综合在线| 欧美精品一区男女天堂| 337p亚洲精品色噜噜狠狠| 欧美亚日韩国产aⅴ精品中极品| 成人黄色777网| 国产v综合v亚洲欧| 国产酒店精品激情| 国产美女精品一区二区三区| 蜜桃av一区二区在线观看| 视频在线观看国产精品| 午夜精品福利视频网站| 亚洲一区二区3| 五月天久久比比资源色| 亚洲一区二区视频在线| 亚洲gay无套男同| 三级精品在线观看| 全国精品久久少妇| 日本在线不卡一区| 精品一区二区影视| 国产综合久久久久久鬼色| 国产精品一区在线观看乱码 | 悠悠色在线精品| 亚洲欧美在线另类| 亚洲精品久久久蜜桃| 亚洲日本免费电影| 亚洲精品少妇30p| 亚洲电影一级片| 青青草国产精品亚洲专区无| 免费av网站大全久久| 国产尤物一区二区在线| 大陆成人av片| 欧美中文字幕一区| 欧美一区二区视频免费观看| 日韩精品一区二区三区蜜臀 | xf在线a精品一区二区视频网站| 精品国产一区二区三区不卡| 久久久久国产精品麻豆ai换脸| 久久久国产一区二区三区四区小说| 国产视频一区二区在线| 18涩涩午夜精品.www| 一区二区三区**美女毛片| 午夜精品福利久久久| 看电影不卡的网站| 99久久精品99国产精品| 欧洲精品在线观看| 日韩欧美中文字幕公布| 欧美激情一区在线| 玉米视频成人免费看| 日本成人在线不卡视频| 国产传媒欧美日韩成人| 日本道精品一区二区三区 | 日韩理论电影院| 亚洲一区二区三区爽爽爽爽爽| 美女一区二区视频| 99在线精品观看| 欧美日韩成人综合| 欧美激情一区三区| 亚洲成人黄色影院| 国产精品1区2区3区在线观看| 99久久国产综合色|国产精品| 91精品国产综合久久久久久| 国产视频一区在线观看| 午夜婷婷国产麻豆精品| 国产乱对白刺激视频不卡| 91国产视频在线观看| 久久蜜桃一区二区| 午夜亚洲福利老司机| 成人性色生活片| 91精品国产91综合久久蜜臀| 亚洲国产精品高清| 日韩激情中文字幕| 99热精品一区二区| 精品女同一区二区| 亚洲一区在线电影| 国产a级毛片一区| 日韩午夜电影在线观看| 亚洲日本在线视频观看| 国产精品一卡二| 欧美一级黄色片| 伊人性伊人情综合网| 国产91在线|亚洲| 日韩精品一区二区三区视频播放 | 国产91精品在线观看| 欧美日韩国产大片| 国产精品久久久久久久久免费相片 | 国产成人av网站| 欧美一二区视频| 亚洲成人在线观看视频| 91蜜桃在线观看| 亚洲国产精品传媒在线观看| 国产综合久久久久久鬼色| 宅男噜噜噜66一区二区66| 亚洲精品福利视频网站| 99re6这里只有精品视频在线观看| 久久久久久久久久看片| 美女网站视频久久| 欧美精三区欧美精三区 | 国产精品一区免费在线观看| 91麻豆精品久久久久蜜臀| 亚洲精品高清视频在线观看| 北岛玲一区二区三区四区| 精品国产sm最大网站免费看| 午夜久久电影网| 欧洲日韩一区二区三区| 一区二区三区中文字幕精品精品| 成人午夜免费av| 国产精品无人区| 成人黄色av电影| 国产精品国产a级| 99re成人在线| 亚洲欧美经典视频| 在线精品观看国产| 亚洲图片欧美色图| 欧美日韩高清一区| 亚洲成人激情社区| 欧美精品自拍偷拍动漫精品| 婷婷一区二区三区| 88在线观看91蜜桃国自产| 丝袜美腿亚洲综合| 欧美电视剧免费全集观看| 精品在线你懂的| 久久久精品影视| 97超碰欧美中文字幕| 一区二区免费在线| 欧美一区二区三区四区久久| 人妖欧美一区二区| 久久蜜桃av一区二区天堂| 国产精品羞羞答答xxdd| 国产精品色呦呦| 一本一道久久a久久精品| 亚洲精选视频免费看| 91国产精品成人| 美女一区二区在线观看| 国产三级一区二区| 91理论电影在线观看| 亚洲国产中文字幕| 精品久久一区二区三区| aaa亚洲精品| 天堂av在线一区| 国产日韩欧美一区二区三区乱码| 99久久er热在这里只有精品15| 一区二区三区四区视频精品免费 | 国产亚洲一区二区三区| av亚洲精华国产精华精华| 一区二区理论电影在线观看| 欧美一级欧美三级| 成人av在线资源| 日日夜夜免费精品视频| 国产午夜亚洲精品理论片色戒| 99riav久久精品riav| 秋霞影院一区二区| 国产精品丝袜91| 91.com在线观看| 成人午夜免费电影| 视频一区欧美精品| 国产精品麻豆久久久| 欧美乱妇15p| 成人在线一区二区三区| 亚洲h在线观看| 国产精品福利一区| 日韩一区二区在线观看视频播放| 成人精品视频网站| 男男视频亚洲欧美| **欧美大码日韩| 精品久久久久久久久久久久久久久| av在线不卡观看免费观看| 蜜桃91丨九色丨蝌蚪91桃色| 亚洲免费电影在线| 久久久99久久精品欧美| 欧美精品亚洲一区二区在线播放| 国产69精品久久99不卡| 青青青爽久久午夜综合久久午夜| 亚洲激情自拍视频| 国产日产欧产精品推荐色| 91精品福利在线一区二区三区| 91丨九色丨尤物|