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

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

?? zl5011xtdm.c

?? Zalink50114----TDMoIP芯片驅動源碼
?? C
?? 第 1 頁 / 共 5 頁
字號:

 Function:
   zl5011xContextAddChannelTx

 Description:
   Adds a channel to a context.

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

 Structure inputs:
   context        context to be used
   tdm.stream     the stream that the channel to be added is from
   tdm.channel    which channel to add
   underrunMode   for structured operation, the behaviour on packet underrun
                  can be set to repeat or playout a fixed pattern
   underrunByte   the fixed pattern to playout during underrun
   osExclusionEnable ZL5011X_TRUE to enable OS exclusion

 Structure outputs:
   None

 Returns:
   zlStatusE

 Remarks:
   None

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

zlStatusE zl5011xContextAddChannelTx(zl5011xParamsS *zl5011xParams,
      zl5011xContextAddChannelTxS *par)
{
   zlStatusE status = ZL5011X_OK;
   Uint32T loop, chanIndex;
   zl5011xWanChannelS tdm;
   zl5011xBooleanE gotDevice = ZL5011X_FALSE;

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

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

   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;
      }
   }

   /* check that the Wan Tx context is valid */
   if (status == ZL5011X_OK)
   {
      status = zl5011xContextCheckTx(zl5011xParams, par->context, ZL5011X_CHECK_CONTEXT_MODIFY);
   }

   /* main function code starts */

   if (status == ZL5011X_OK)
   {
      ZL5011X_TRACE_CONTEXT(ZL5011X_TDM_FN_ID, par->context,
            "zl5011xContextAddChannelTx: ctxt %3d",
            par->context, 0, 0, 0, 0, 0);
   }

   if (par->checkChannelCombination == ZL5011X_TRUE)
   {
      if (status == ZL5011X_OK)
      {
         /* check that a valid stream / channel combination has been provided before
            making any further checks */
         status = zl5011xCheckTdm(zl5011xParams, par->tdm, &chanIndex);
      }

      tdm.channel = par->tdm.channel;

      /* check that no other channels of this number have been configured so far */
      for (loop = 0; loop < zl5011xParams->wanIf.wanNumStreams; loop++)
      {
         if (status != ZL5011X_OK)
         {
            break;
         }

         tdm.stream = (Uint8T)loop;
         status = zl5011xCalcChanIndex(zl5011xParams, tdm, &chanIndex);

         if (status == ZL5011X_OK)
         {
            if (zl5011xParams->wanIf.tfmCurrent.channel[chanIndex].context == par->context)
            {
               if (par->tdm.stream != tdm.stream)
               {
                  status = ZL5011X_CHANNEL_INVALID;
               }
            }
         }
      }
   }

   if (status == ZL5011X_OK)
   {
      status = zl5011xTfmAddChan(zl5011xParams, par->context, par->tdm);
   }

   if (status == ZL5011X_OK)
   {
      /* the channel defaults to the last byte when added by the TFM.
         If the underrun byte is specified, then set it */
      if (par->underrunMode == ZL5011X_WAN_USE_FIXED_BYTE)
      {
         status = zl5011xTfmSetChanUnderrun(zl5011xParams, par->tdm,
               par->underrunByte, par->underrunMode);
      }
   }

   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);
      }
   }

   return status;
}

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

 Function:
   zl5011xWanTxQueueConfigStructInit

 Description:
   Initialises structure used by zl5011xWanTxQueueConfig 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 zl5011xWanTxQueueConfigStructInit(zl5011xParamsS *zl5011xParams,
      zl5011xWanTxQueueConfigS *par)
{
   zlStatusE status = ZL5011X_OK;

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

   if (status == ZL5011X_OK)
   {
      ZL5011X_TRACE(ZL5011X_TDM_FN_ID,
            "zl5011xWanTxQueueConfigStructInit:",
            0, 0, 0, 0, 0, 0);

      par->context = (Uint32T)ZL5011X_INVALID_CONTEXT;

      par->queueSize = ZL5011X_WAN_TX_QUEUE_SIZE_4;
      par->queueMode = ZL5011X_WAN_TX_QUEUE_RESEQUENCE_8;

      /* default setting for the jitter buffer of 3 frames.
         That is 3 * 125us, since 1 frame @ 8kHz is 125 micro-seconds */
      par->jitterBufferSizeUs = 3 * 125;
      par->osExclusionEnable = ZL5011X_TRUE;
   }

   return status;
}

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

 Function:
   zl5011xWanTxQueueConfig

 Description:
   Configures a Wan Tx queue. Packet memory for the queue is allocated from the
   packet memory heap for the device.

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

 Structure inputs:
   context        context to be used
   queueMode      sets the mode of the queue - FIFO or resequencing
   queueSize      sets how large the queue should be in packets.
                  i.e. queue size in frames = queue size * frames per packet
                       queue size in us = queue size in frames * 125
                  The queue size should be sufficient to handle the expected
                  packet delay variation, and the jitter buffer size is used
                  to set the initial depth of the queue.
   jitterBufferSizeUs   the jitter buffer is used to set the initial queue
                        depth in micro-seconds (us). Each frame is 125us.
   osExclusionEnable ZL5011X_TRUE to enable OS exclusion

 Structure outputs:
   None

 Returns:
   zlStatusE

 Remarks:
   At initialisation time, each queue is marked as uninitialised. When a queue
   is configured, memory from the heap is used. This remains allocated to this
   queue until it is reconfigured. That is tearing down a queue DOES NOT free
   up the memory used by the queue.
   The queue can only be configured when the context is in the INIT state.

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

zlStatusE zl5011xWanTxQueueConfig(zl5011xParamsS *zl5011xParams,
      zl5011xWanTxQueueConfigS *par)
{
   zlStatusE status = ZL5011X_OK;
   Uint32T queueSizeBytes, queueBaseAddress;
   zl5011xBooleanE gotDevice = ZL5011X_FALSE;

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

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

   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;
      }
   }

   /* check that the Wan Tx context is valid */
   if (status == ZL5011X_OK)
   {
      status = zl5011xContextCheckTx(zl5011xParams, par->context, ZL5011X_CHECK_CONTEXT_INIT);
   }

   /* main function code starts */

   if (status == ZL5011X_OK)
   {
      ZL5011X_TRACE_CONTEXT(ZL5011X_TDM_FN_ID, par->context,
            "zl5011xWanTxQueueConfig: ctxt %3d",
            par->context, 0, 0, 0, 0, 0);
   }

   if (status == ZL5011X_OK)
   {
      status = ZL5011X_CHECK_WAN_TX_QUEUE_SIZE(par->queueSize);
   }

   if (status == ZL5011X_OK)
   {
      if (zl5011xParams->wanIf.txQueue[par->context].queueBaseAddress != (Uint32T)ZL5011X_NOT_INITIALISED)
      {
         /* if the queue has already been initialised then free the currently
            allocated memory */
         status = zl5011xMmFree(zl5011xParams, zl5011xParams->wanIf.txQueue[par->context].queueBaseAddress);

         if (status == ZL5011X_OK)
         {
            /* if the queue was free'd, then keep track in the structure */
            zl5011xParams->wanIf.txQueue[par->context].queueBaseAddress = (Uint32T)ZL5011X_NOT_INITIALISED;
         }
      }
   }

   if (status == ZL5011X_OK)
   {
      /* calculate the required queue size */
      queueSizeBytes = ZL5011X_1BIT_MASK << par->queueSize;
      queueSizeBytes *= ZL5011X_TFQ_MESSAGE_SIZE_WORDS;

      /* convert this to bytes from 32 bit words */
      queueSizeBytes *= sizeof(Uint32T);
   }

   if (status == ZL5011X_OK)
   {
      status = zl5011xMmAlloc(zl5011xParams, queueSizeBytes, &queueBaseAddress);
   }

   if (status == ZL5011X_OK)
   {
      status = zl5011xTfqConfigure(zl5011xParams, par->context, queueBaseAddress,
            par->queueSize, par->queueMode);

      if (status != ZL5011X_OK)
      {
         /* failed to configure the queue, so free up the memory that was
            previously allocated. Ignore the return code from the free fn */
         (void)zl5011xMmFree(zl5011xParams, queueBaseAddress);
      }
   }

   if (status == ZL5011X_OK)
   {
      /* set the TFQ averager to a value that gives resolution to .5 packet */
      status = zl5011xTfqSetACP(zl5011xParams, par->context, ZL5011X_WAN_TX_QUEUE_AVG_512);
   }

   if (status == ZL5011X_OK)
   {
      status = zl5011xTfmSetJitterBufferTime(zl5011xParams, par->context, par->jitterBufferSizeUs);
   }

   if (status == ZL5011X_OK)
   {
      zl5011xParams->wanIf.txQueue[par->context].queueInitialised = ZL5011X_TRUE;
   }

   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);
      }
   }

   return status;
}

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

 Function:
   zl5011xContextRemoveChannelRxStructInit

 Description:
   Initialises structure used by zl5011xContextRemoveChannelRx 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 zl5011xContextRemoveChannelRxStructInit(zl5011xParamsS *zl5011xParams,
      zl5011xContextRemoveChannelS *par)
{
   zlStatusE status = ZL5011X_OK;

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

   if (status == ZL5011X_OK)
   {
      ZL5011X_TRACE(ZL5011X_TDM_FN_ID,
            "zl5011xContextRemoveChannelRxStructInit:",
            0, 0, 0, 0, 0, 0);

      par->context = (Uint32T)ZL5011X_INVALID_CONTEXT;
      par->tdm.stream = (Uint8T)ZL5011X_INVALID_STREAM;
      par->tdm.channel = (Uint8T)ZL5011X_INVALID_CHANNEL;
      par->osExclusionEnable = ZL5011X_TRUE;
   }

   return status;
}

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

 Function:
   zl5011xContextRemoveChannelRx

 Description:
   Removes a channel from a context.

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

 Structure inputs:
   context        context to be used

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜久久福利影院| 欧美影院精品一区| 色综合中文字幕| 欧美一卡二卡在线观看| 国产精品你懂的在线欣赏| 日本va欧美va精品发布| 欧美日韩五月天| 久久久精品日韩欧美| 亚洲.国产.中文慕字在线| 国产精品中文字幕欧美| 欧美日韩精品欧美日韩精品一 | 国产精品传媒入口麻豆| 日韩国产欧美在线观看| 不卡区在线中文字幕| 欧美一区二区三区色| 夜夜精品浪潮av一区二区三区| 国产精品99久久不卡二区| 欧美一激情一区二区三区| 亚洲色图欧洲色图| 国产精品影视网| 欧美不卡一区二区三区| 日日夜夜免费精品视频| 在线精品视频免费观看| 中文字幕一区二区三| 国产成人av一区二区三区在线| 91麻豆精品久久久久蜜臀| 亚洲午夜影视影院在线观看| 一本一本大道香蕉久在线精品| 欧美国产成人精品| 国产精品2024| 久久久亚洲高清| 国产在线播放一区三区四| 日韩一区二区三区观看| 日本一道高清亚洲日美韩| 56国语精品自产拍在线观看| 日韩中文字幕区一区有砖一区| 日本高清视频一区二区| 1000精品久久久久久久久| a4yy欧美一区二区三区| 一区视频在线播放| 91网页版在线| 夜夜嗨av一区二区三区中文字幕| 色婷婷国产精品| 五月婷婷久久综合| 欧美日韩国产一级片| 日韩制服丝袜先锋影音| 51午夜精品国产| 九九精品视频在线看| 久久婷婷国产综合精品青草| 国产99久久久久久免费看农村| 国产精品高潮久久久久无| 波多野结衣欧美| 亚洲综合在线第一页| 欧美精品一二三| 国内精品免费在线观看| 中文天堂在线一区| 一本高清dvd不卡在线观看 | 日本精品一区二区三区高清 | 日本一区二区三区在线观看| 国产aⅴ精品一区二区三区色成熟| 综合中文字幕亚洲| 在线观看免费成人| 久久精品噜噜噜成人av农村| 国产日本一区二区| 91免费版在线| 日韩精品色哟哟| 亚洲国产精品成人综合| 在线观看成人小视频| 精品无人码麻豆乱码1区2区| 亚洲欧洲精品天堂一级| 欧美二区在线观看| 高清视频一区二区| 亚洲国产视频直播| 精品国产乱码久久久久久久| 91美女精品福利| 久久不见久久见免费视频7| 国产精品毛片高清在线完整版| 欧美日韩一本到| 丁香天五香天堂综合| 亚洲国产精品尤物yw在线观看| 久久久九九九九| 欧美三级电影网| www.日韩大片| 国产在线精品国自产拍免费| 午夜精品福利视频网站| 欧美国产一区在线| 日韩精品中文字幕一区 | 91精品国产欧美日韩| 国产精品99久久久久久有的能看 | 欧美丰满少妇xxxxx高潮对白| 国产99久久久国产精品潘金 | 678五月天丁香亚洲综合网| 不卡视频免费播放| 国内不卡的二区三区中文字幕| 亚洲成人黄色影院| 国产精品污污网站在线观看| 亚洲精品一区二区三区香蕉| 欧美猛男gaygay网站| 97久久人人超碰| 大陆成人av片| 粉嫩aⅴ一区二区三区四区五区 | 一区二区三区国产豹纹内裤在线| 国产亚洲一区二区三区四区| 日韩一区二区三区精品视频| 欧美日韩免费一区二区三区视频| 99久久精品免费观看| 成人免费高清视频在线观看| 国产激情视频一区二区三区欧美| 久久99久久99| 久久9热精品视频| 另类综合日韩欧美亚洲| 日韩专区中文字幕一区二区| 亚洲成人中文在线| 麻豆91在线播放| 久久电影国产免费久久电影| 日本va欧美va欧美va精品| 爽爽淫人综合网网站| 亚洲bt欧美bt精品| 亚洲成人免费观看| 五月天亚洲婷婷| 午夜激情一区二区| 日韩成人伦理电影在线观看| 青青草伊人久久| 美日韩一区二区| 狠狠v欧美v日韩v亚洲ⅴ| 紧缚捆绑精品一区二区| 国内精品国产成人| 懂色av一区二区三区免费观看| 成人综合婷婷国产精品久久| 91天堂素人约啪| 日本韩国精品一区二区在线观看| 欧美体内she精高潮| 欧美日本一道本| 欧美成人精品福利| 国产欧美一区二区精品性| 亚洲国产精华液网站w| 亚洲人吸女人奶水| 亚洲国产欧美在线人成| 青青青爽久久午夜综合久久午夜| 国产一区美女在线| 成人激情小说网站| 91成人免费在线视频| 日韩一本二本av| 国产精品视频一区二区三区不卡| 一级特黄大欧美久久久| 天天影视涩香欲综合网| 国内精品久久久久影院一蜜桃| 99精品欧美一区| 日韩一区二区在线看| 日本一区二区免费在线| 亚洲精品美腿丝袜| 美洲天堂一区二卡三卡四卡视频| 国产成人精品综合在线观看| 欧美亚洲国产一区二区三区| 26uuu国产日韩综合| 亚洲视频网在线直播| 另类小说综合欧美亚洲| 99re66热这里只有精品3直播 | 亚洲欧美日韩一区| 免费成人在线视频观看| 99久久久国产精品| 日韩欧美电影一区| 亚洲精品中文在线| 国内不卡的二区三区中文字幕| 91国偷自产一区二区开放时间| 日韩欧美国产综合在线一区二区三区| 国产精品三级电影| 日韩av一区二区三区| 99re视频精品| 久久久久久久久久久久电影 | 欧美猛男超大videosgay| 久久久av毛片精品| 午夜成人免费电影| 99久久久久免费精品国产| 欧美大黄免费观看| 亚洲成av人片一区二区梦乃| 成人精品小蝌蚪| 久久综合视频网| 男女男精品网站| 欧美少妇bbb| 亚洲视频精选在线| 国产在线不卡一卡二卡三卡四卡| 欧美福利电影网| 午夜在线电影亚洲一区| 99久久久久久| 中文字幕在线不卡| 国产高清久久久| 精品粉嫩aⅴ一区二区三区四区| 亚洲成人免费在线| 91黄色激情网站| 伊人开心综合网| 91啪亚洲精品| 日韩一区日韩二区| 成人国产精品免费观看动漫| 欧美激情在线看| 制服丝袜在线91| 水蜜桃久久夜色精品一区的特点| 欧洲精品中文字幕| 一区二区三区不卡在线观看| 在线精品视频小说1|