亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
日韩欧美国产不卡| 在线观看日韩精品| 欧美精品一区二区三区一线天视频 | 精品久久久久久久一区二区蜜臀| 精品一区二区三区在线播放视频| 日韩女优视频免费观看| 国产精品18久久久久久久网站| 中文字幕+乱码+中文字幕一区| 99精品国产视频| 亚洲福利国产精品| 日韩美一区二区三区| 成人免费看片app下载| 一区二区三区产品免费精品久久75| 欧美婷婷六月丁香综合色| 日本不卡一区二区三区高清视频| 精品剧情在线观看| 99re66热这里只有精品3直播| 亚洲成人一二三| 久久久蜜桃精品| 色欧美日韩亚洲| 捆绑变态av一区二区三区| 国产精品免费观看视频| 欧美日韩国产在线观看| 成人免费精品视频| 日精品一区二区三区| 欧美国产日韩亚洲一区| 91精品麻豆日日躁夜夜躁| 高清日韩电视剧大全免费| 亚洲国产精品嫩草影院| 日本一区免费视频| 欧美一级淫片007| 成人av在线一区二区三区| 日日摸夜夜添夜夜添亚洲女人| 国产女人水真多18毛片18精品视频 | 国产成人高清视频| 亚洲国产一区二区视频| 久久一留热品黄| 欧美情侣在线播放| 99国产精品久| 精品写真视频在线观看| 亚洲成人精品一区| 亚洲日本在线观看| 欧美国产成人精品| 91精品国产综合久久久蜜臀粉嫩 | 欧美日韩一区不卡| caoporen国产精品视频| 激情丁香综合五月| 日韩精品一二三| 伊人夜夜躁av伊人久久| 欧美国产欧美亚州国产日韩mv天天看完整| 91麻豆精品国产91久久久久久久久 | 91福利在线免费观看| 国产福利91精品一区二区三区| 日韩av中文在线观看| 亚洲成人激情自拍| 亚洲激情男女视频| 亚洲欧洲日本在线| 亚洲国产电影在线观看| 精品国产91乱码一区二区三区 | 91精品国产91久久久久久最新毛片 | 毛片基地黄久久久久久天堂| 一区二区免费在线| 亚洲自拍偷拍九九九| 亚洲青青青在线视频| 国产精品九色蝌蚪自拍| 国产精品午夜在线观看| 国产午夜精品一区二区| 精品久久99ma| 久久亚区不卡日本| 久久婷婷综合激情| 久久人人超碰精品| 国产亚洲精品aa| 日本一区二区不卡视频| 国产欧美1区2区3区| 国产精品嫩草久久久久| 国产精品免费观看视频| 最新高清无码专区| 日韩欧美一区二区三区在线| 日韩一级视频免费观看在线| 日韩一区二区免费电影| 精品国产乱码久久久久久牛牛| 精品国产成人系列| 中国色在线观看另类| 日韩理论片在线| 亚洲综合偷拍欧美一区色| 亚洲第一搞黄网站| 美女视频网站久久| 国产精品88av| 99久久久国产精品免费蜜臀| 欧美在线短视频| 在线91免费看| 久久先锋资源网| 国产精品麻豆一区二区| 亚洲综合色区另类av| 天天综合网天天综合色| 精品一区二区三区免费| 不卡av免费在线观看| 在线视频你懂得一区| 欧美日韩国产a| 久久久噜噜噜久久人人看 | 51精品久久久久久久蜜臀| 日韩精品一区二区在线观看| 国产丝袜欧美中文另类| 亚洲激情在线播放| 久久99精品久久久久婷婷| 懂色av一区二区三区免费观看| 91麻豆123| 91精品国产综合久久精品性色| 久久综合中文字幕| 亚洲在线一区二区三区| 久久99久久99小草精品免视看| 99国产一区二区三精品乱码| 91精品国产高清一区二区三区蜜臀 | 国产在线日韩欧美| 色偷偷88欧美精品久久久| 日韩免费一区二区三区在线播放| 国产精品护士白丝一区av| 午夜精品一区在线观看| 丰满岳乱妇一区二区三区| 欧美日韩一级黄| 国产欧美精品国产国产专区| 首页综合国产亚洲丝袜| 成人福利在线看| 日韩欧美电影一区| 亚洲欧美经典视频| 国产精品一区二区在线看| 欧美午夜精品久久久久久超碰 | 在线视频一区二区三区| 久久久久久久久蜜桃| 午夜伦理一区二区| 波多野结衣中文字幕一区二区三区| 在线综合亚洲欧美在线视频| 亚洲欧美日韩电影| 国产激情精品久久久第一区二区| 欧美女孩性生活视频| 国产精品国产三级国产三级人妇 | 99久久久国产精品| 久久久欧美精品sm网站| 免费一级片91| 在线观看91视频| 亚洲私人影院在线观看| 成人免费毛片片v| 欧美电视剧在线观看完整版| 性做久久久久久免费观看| 91麻豆免费看| 亚洲人吸女人奶水| 99久久99久久精品国产片果冻 | 国产日韩成人精品| 久久草av在线| 91麻豆精品国产91久久久 | 国产视频一区二区三区在线观看| 免费观看在线综合色| 欧美日韩国产免费一区二区| 夜夜爽夜夜爽精品视频| 色狠狠桃花综合| 亚洲人成在线播放网站岛国| av一本久道久久综合久久鬼色| 中文字幕成人网| 成人黄色a**站在线观看| 2020国产精品自拍| 国产乱淫av一区二区三区| 日韩精品一区在线| 久久er99热精品一区二区| 日韩欧美在线影院| 九九视频精品免费| 久久亚洲二区三区| 国产成人精品午夜视频免费| 国产偷v国产偷v亚洲高清| 国产精品一区二区无线| 国产日韩欧美高清在线| 成人免费电影视频| 亚洲欧洲精品成人久久奇米网| 成人国产精品免费观看视频| 中文字幕一区二区三区蜜月| av爱爱亚洲一区| 一区二区三区精密机械公司| 久久欧美中文字幕| 国产超碰在线一区| 国产精品灌醉下药二区| 91麻豆swag| 日韩精品视频网| 欧美成人一区二区三区| 国产精品一区二区三区乱码| 欧美国产一区在线| 色综合中文字幕| 天天av天天翘天天综合网色鬼国产 | 国产一区二区看久久| 亚洲国产成人在线| 欧美偷拍一区二区| 久久激五月天综合精品| 国产亚洲精品bt天堂精选| 色婷婷久久久亚洲一区二区三区| 亚洲在线视频免费观看| 日韩精品中文字幕一区| 国产福利91精品| 亚洲国产视频直播| 精品久久久久一区二区国产| heyzo一本久久综合| 视频在线在亚洲| 中文字幕欧美国产|