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

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

?? zl5011xpla.c

?? Zalink50114----TDMoIP芯片驅動源碼
?? C
?? 第 1 頁 / 共 4 頁
字號:
      if ((zl5011xParams->wanIf.plaCurrent.channel[loop].context == context) ||
         (zl5011xParams->wanIf.plaActive.channel[loop].context == context))
      {
         zl5011xParams->wanIf.plaCurrent.channel[loop].context = (Uint32T)ZL5011X_INVALID_CONTEXT;
         zl5011xParams->wanIf.plaActive.channel[loop].context = (Uint32T)ZL5011X_INVALID_CONTEXT;
      }
   }

   zl5011xParams->wanIf.plaCurrent.context[context].numChannels = 0;
   zl5011xParams->wanIf.plaCurrent.context[context].firstChannelIndex = (Uint32T)ZL5011X_INVALID_CHANNEL;

   zl5011xParams->wanIf.plaActive.context[context].numChannels = 0;
   zl5011xParams->wanIf.plaActive.context[context].firstChannelIndex = (Uint32T)ZL5011X_INVALID_CHANNEL;

   /* the context now has no channels associated, but we have to wait for the
      queue to flush before we can reuse the context */
   zl5011xParams->wanIf.plaCurrent.context[context].state = ZL5011X_STATE_NOT_IN_USE;

   return(status);
}

/*****************************************************************************
Function:
   zl5011xPlaUpdateActiveContext

Description:
   Copies the context setup from the current structures to the active
   structures. This frees up any channels that were used in the active channel
   but are no longer used.
   Sets the state for the context to be active.

Inputs:
   zl5011xParams   Pointer to the structure for this device instance
   context     which context to update

Outputs:
   None

 Returns:
   zlStatusE

 Remarks:
    None

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

zlStatusE zl5011xPlaUpdateActiveContext(zl5011xParamsS *zl5011xParams, Uint32T context)
{
   zlStatusE status = ZL5011X_OK;
   Uint32T loop;

   ZL5011X_TRACE(ZL5011X_PLA_FN_ID, "zl5011xPlaUpdateActiveContext: ctxt %3d",
         context, 0, 0, 0, 0, 0);

   /* copy the channel information from current to active structure */
   for (loop = 0; loop < ZL5011X_MAX_NUMBER_CHANNELS; loop++)
   {
      if ((zl5011xParams->wanIf.plaCurrent.channel[loop].context == context) ||
         (zl5011xParams->wanIf.plaActive.channel[loop].context == context))
      {
         zl5011xParams->wanIf.plaActive.channel[loop].context =
               zl5011xParams->wanIf.plaCurrent.channel[loop].context;
      }
   }

   /* copy the context information from current to active structure */
   memcpy(zl5011xParams->wanIf.plaActive.context + context,
         zl5011xParams->wanIf.plaCurrent.context + context,
         sizeof(zl5011xWanTxContextS));

   zl5011xParams->wanIf.plaCurrent.context[context].state = ZL5011X_STATE_ACTIVE;

   return(status);
}

/*****************************************************************************
Function:
   zl5011xPlaTeardownContext

Description:
   Sets the teardown bit for the context. If an update has been requested, then
   clear that and set the teardown bit.

Inputs:
   zl5011xParams   Pointer to the structure for this device instance
   context     which context

Outputs:
   None

 Returns:
   zlStatusE

 Remarks:
    None

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

zlStatusE zl5011xPlaTeardownContext(zl5011xParamsS *zl5011xParams, Uint32T context)
{
   zlStatusE status = ZL5011X_OK;
   Uint32T temp;

   ZL5011X_TRACE(ZL5011X_PLA_FN_ID, "zl5011xPlaTeardownContext: ctxt %3d",
         context, 0, 0, 0, 0, 0);

   if (zl5011xParams->wanIf.plaCurrent.context[context].state != ZL5011X_STATE_TAKEN)
   {
      status = ZL5011X_CONTEXT_NOT_TAKEN;
   }

   if (status == ZL5011X_OK)
   {
      status = zl5011xRead(zl5011xParams,
            ZL5011X_PLA_CONTEXT_MEMORY1 + (context * ZL5011X_PLA_CTXT_MEM1_SIZE),
            &temp);
   }

   if (status == ZL5011X_OK)
   {
      /* if a teardown is requested, then cancel the update bit if it were
         set, since teardown is a higher priority */
      temp |= ZL5011X_1BIT_MASK << ZL5011X_PLA_TEARDOWN_BIT;
      temp &= ~(ZL5011X_1BIT_MASK << ZL5011X_PLA_UPDATE_BIT);

      status = zl5011xWrite(zl5011xParams,
            ZL5011X_PLA_CONTEXT_MEMORY1 + (context * ZL5011X_PLA_CTXT_MEM1_SIZE),
            temp);

      zl5011xParams->wanIf.plaCurrent.context[context].state = ZL5011X_STATE_TEARING_DOWN;
   }

   return(status);
}

/*****************************************************************************
Function:
   zl5011xPlaUpdateContext

Description:
   Sets the update bit for the context.

Inputs:
   zl5011xParams   Pointer to the structure for this device instance
   context     which context

Outputs:
   None

 Returns:
   zlStatusE

 Remarks:
    None

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

zlStatusE zl5011xPlaUpdateContext(zl5011xParamsS *zl5011xParams, Uint32T context)
{
   zlStatusE status = ZL5011X_OK;
   Uint32T temp;

   ZL5011X_TRACE(ZL5011X_PLA_FN_ID, "zl5011xPlaUpdateContext: ctxt %3d",
         context, 0, 0, 0, 0, 0);

   /* the context can be updated from the INIT or TAKEN state. The error code is
      to show that the context needs to be taken before it can be updated */
   if ((zl5011xParams->wanIf.plaCurrent.context[context].state != ZL5011X_STATE_TAKEN) &&
      (zl5011xParams->wanIf.plaCurrent.context[context].state != ZL5011X_STATE_INIT))
   {
      status = ZL5011X_CONTEXT_NOT_TAKEN;
   }

   if (status == ZL5011X_OK)
   {
      status = zl5011xRead(zl5011xParams,
            ZL5011X_PLA_CONTEXT_MEMORY1 + (context * ZL5011X_PLA_CTXT_MEM1_SIZE),
            &temp);
   }

   if (status == ZL5011X_OK)
   {
         /* cannot request an update and a teardown at the same time */
      if ((temp & (ZL5011X_1BIT_MASK << ZL5011X_PLA_TEARDOWN_BIT)) != 0)
      {
         status = ZL5011X_CONTEXT_IN_UPDATE;
      }
   }

   if (status == ZL5011X_OK)
   {
      /* set the update bit */
      temp |= ZL5011X_1BIT_MASK << ZL5011X_PLA_UPDATE_BIT;

      status = zl5011xWrite(zl5011xParams,
            ZL5011X_PLA_CONTEXT_MEMORY1 + (context * ZL5011X_PLA_CTXT_MEM1_SIZE),
            temp);

      zl5011xParams->wanIf.plaCurrent.context[context].state = ZL5011X_STATE_UPDATING;
   }

   return(status);
}

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

Function:
   zl5011xPlaSetPayloadLength

Description:
   Sets the payload length in bytes for the context.

Inputs:
   zl5011xParams   Pointer to the structure for this device instance
   context        which context to get the length for.
   length         number of bytes per packet for the context

Outputs:
   None

 Returns:
   zlStatusE

 Remarks:
    None

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

zlStatusE zl5011xPlaSetPayloadLength(zl5011xParamsS *zl5011xParams, Uint32T context,
      Uint32T length)
{
   Uint32T bit, bitMask;
   zlStatusE status = ZL5011X_OK;

   ZL5011X_TRACE_CONTEXT(ZL5011X_PLA_FN_ID, context,
         "zl5011xPlaSetPayloadLength: ctxt %3d, length %d",
         context, length, 0, 0, 0, 0);

   if ((length & ~ZL5011X_PLA_PKT_LENGTH_MASK) != 0)
   {
      status = ZL5011X_PARAMETER_INVALID;
   }

   if (status == ZL5011X_OK)
   {
      bit = length << ZL5011X_PLA_PKT_LENGTH_BITS;
      bitMask = ZL5011X_PLA_PKT_LENGTH_MASK << ZL5011X_PLA_PKT_LENGTH_BITS;

      status = zl5011xReadModWrite(zl5011xParams,
            ZL5011X_PLA_CONTEXT_MEMORY1 + (context * ZL5011X_PLA_CTXT_MEM1_SIZE),
            bit, bitMask);
   }

   return(status);
}

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

Function:
   zl5011xPlaSetFlowType

Description:
   Sets the flow type for the context, and adds the MPID.

Inputs:
   zl5011xParams   Pointer to the structure for this device instance
   context        which context to operate on
   flow           flow type to program
   mpid           value to set in the MPID field for this context

Outputs:
   none

 Returns:
   zlStatusE

 Remarks:
    None

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

zlStatusE zl5011xPlaSetFlowType(zl5011xParamsS *zl5011xParams, Uint32T context,
      zl5011xFlowTypeE flow, Uint32T mpid)
{
   Uint32T bits, bitMask;
   zlStatusE status = ZL5011X_OK;

   ZL5011X_TRACE_CONTEXT(ZL5011X_PLA_FN_ID, context,
         "zl5011xPlaSetFlowType: ctxt %3d, flow %d, mpid %3d",
         context, flow, mpid, 0, 0, 0);

   status = ZL5011X_CHECK_FLOW_TYPE(flow);

   if (status == ZL5011X_OK)
   {
      if ((mpid & ~ZL5011X_PLA_CONTEXT_MASK) != 0)
      {
         status = ZL5011X_PARAMETER_INVALID;
      }
   }

   if (status == ZL5011X_OK)
   {

      bits = (flow << ZL5011X_PLA_FLOW_TYPE_BITS) |
            (mpid << ZL5011X_PLA_MPID_BITS);

      bitMask = (ZL5011X_PLA_FLOW_TYPE_MASK << ZL5011X_PLA_FLOW_TYPE_BITS) |
            (ZL5011X_PLA_MPID_MASK << ZL5011X_PLA_MPID_BITS);

      status = zl5011xReadModWrite(zl5011xParams,
            ZL5011X_PLA_CONTEXT_MEMORY2 + (context * ZL5011X_PLA_CTXT_MEM2_SIZE),
            bits, bitMask);
   }

   return(status);
}

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

Function:
   zl5011xPlaSetInterruptMask

Description:
   Sets the interrupt mask bits in the device.

Inputs:
   zl5011xParams   Pointer to the structure for this device instance
   context        which context to get the length for.
   intBits        interrupt mask bits

Outputs:
   None

 Returns:
   zlStatusE

 Remarks:
    None

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

zlStatusE zl5011xPlaSetInterruptMask(zl5011xParamsS *zl5011xParams, Uint32T context,
      Uint32T intBits)
{
   zlStatusE status = ZL5011X_OK;
   Uint32T bitMask;

   ZL5011X_TRACE(ZL5011X_PLA_FN_ID, "zl5011xPlaSetInterruptMask: ctxt %3d, mask %08X",
         context, intBits, 0, 0, 0, 0);

   bitMask = (ZL5011X_1BIT_MASK << ZL5011X_PLA_QUEUE_ERR_INT) |
         (ZL5011X_1BIT_MASK << ZL5011X_PLA_QUEUE_WARN_INT) |
         (ZL5011X_1BIT_MASK << ZL5011X_PLA_CACHE_ERR_INT) |
         (ZL5011X_1BIT_MASK << ZL5011X_PLA_GRANULE_ERR_INT) |
         (ZL5011X_1BIT_MASK << ZL5011X_PLA_FRAME_INT);

   status = zl5011xReadModWrite(zl5011xParams,
         ZL5011X_PLA_CONTEXT_MEMORY1 + (context * ZL5011X_PLA_CTXT_MEM1_SIZE),
         intBits, bitMask);

   return(status);
}

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

Function:
   zl5011xPlaGetCurrentHeader

Description:
   This function is called to get the state of the current ctxt_sw bit.
   This bit is used to select the header to attach in the packet formation
   blocks.

Inputs:
   zl5011xParams   Pointer to the structure for this device instance
   context        which context to get the ctct sw for

Outputs:
   ctxtSw         which header is currently in use.

 Returns:
   zlStatusE

 Remarks:
    None

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

zlStatusE zl5011xPlaGetCurrentHeader(zl5011xParamsS *zl5011xParams,
          Uint32T context, zl5011xContextHeaderSwitchE *ctxtSw)
{
   zlStatusE status = ZL5011X_OK;
   Uint32T readValue;

   status = zl5011xRead(zl5011xParams,
         ZL5011X_PLA_STATE_MEMORY1 + (context * ZL5011X_PLA_CTXT_MEM1_SIZE),
         &readValue);

   if ((readValue & (ZL5011X_1BIT_MASK >> ZL5011X_PLA_CTXT_SW_BIT)) == 0)
   {
      *ctxtSw = ZL5011X_PRIMARY_HEADER;
   }
   else
   {
      *ctxtSw = ZL5011X_SECONDARY_HEADER;
   }

   ZL5011X_TRACE_CONTEXT(ZL5011X_PLA_FN_ID, context,
         "zl5011xPlaGetCurrentHeader: ctxt %3d, ctxt sw %d",
         context, *ctxtSw, 0, 0, 0, 0);

   return(status);
}

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

Function:
   zl5011xPlaGetErroredContext

Description:
   This function is called to get a context ID from the interrupt queue.

Inputs:
   zl5011xParams   Pointer to the structure for this device instance

Outputs:
   context        ID from the interrupt queue

 Returns:
   zlStatusE

 Remarks:
    None

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

zlStatusE zl5011xPlaGetErroredContext(zl5011xParamsS *zl5011xParams,
          Uint32T *context)
{
   zlStatusE status = ZL5011X_OK;
   Uint32T readValue;

   status = zl5011xRead(zl5011xParams, ZL5011X_PLA_INTERRUPT_QUEUE,
         &readValue);

   *context = (readValue >> ZL5011X_PLA_INT_QUEUE_CTXT_BITS) & ZL5011X_PLA_CONTEXT_MASK;

   ZL5011X_TRACE(ZL5011X_PLA_FN_ID, "zl5011xPlaGetErroredContext: ctxt %3d",
         *context, 0, 0, 0, 0, 0);

   return(status);
}

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

Function:
   zl5011xPlaGetError

Description:
   Collects the error flags for a context, and resets them.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产麻豆精品在线| 欧美日韩一区二区三区在线| 一本大道av一区二区在线播放| 精品视频1区2区| 欧美国产1区2区| 国产一区二区三区最好精华液| 欧美性色黄大片手机版| 国产精品高潮久久久久无| 美女国产一区二区三区| 欧美亚洲综合另类| 亚洲蜜桃精久久久久久久| 国产不卡在线播放| 精品国产欧美一区二区| 97久久精品人人澡人人爽| 欧美变态tickle挠乳网站| 视频在线观看91| 欧美精品精品一区| 亚洲成人午夜电影| 在线视频国产一区| 亚洲人成小说网站色在线| 成人av资源在线| 国产精品女同互慰在线看| 国产成人小视频| 久久美女高清视频| 国产精品88av| 久久亚洲精品国产精品紫薇| 久久精品国产亚洲a| 日韩一级高清毛片| 久久不见久久见免费视频1| 欧美精选一区二区| 日韩精品乱码av一区二区| 欧美日韩一区精品| 日韩精品欧美精品| 欧美成人精品高清在线播放| 老司机精品视频一区二区三区| 欧美videos中文字幕| 精品一区二区三区视频| 国产午夜精品美女毛片视频| 国产传媒久久文化传媒| 国产精品女同一区二区三区| a级精品国产片在线观看| 中文字幕综合网| 99riav久久精品riav| 亚洲男人的天堂在线aⅴ视频| 欧美性猛交一区二区三区精品| 天使萌一区二区三区免费观看| 欧美疯狂性受xxxxx喷水图片| 日本欧美肥老太交大片| 精品99一区二区| 97久久精品人人爽人人爽蜜臀| 一片黄亚洲嫩模| 日韩精品一区二区三区中文不卡 | 欧美三级日韩三级| 天天色天天操综合| 欧美大片在线观看一区| 成人a免费在线看| 一区二区三区日韩精品视频| 91精品免费在线观看| 国产福利91精品一区二区三区| 综合色天天鬼久久鬼色| 4438x亚洲最大成人网| 国产精品99久久不卡二区| 一区二区三区鲁丝不卡| 日韩午夜在线影院| jvid福利写真一区二区三区| 偷偷要91色婷婷| 中文字幕欧美一| 欧美日韩国产系列| 成人动漫视频在线| 蜜桃在线一区二区三区| 亚洲人精品午夜| 久久久久久久久久久久电影| 欧美日韩一本到| 欧美色成人综合| 午夜免费欧美电影| 午夜激情久久久| 中文字幕av一区二区三区免费看| 日日夜夜一区二区| 国产精品国产三级国产aⅴ入口| 欧美高清你懂得| 不卡一区在线观看| 蜜臀久久99精品久久久久久9| 国产欧美一区二区三区鸳鸯浴 | 久久久久亚洲综合| 欧美综合天天夜夜久久| 成人性生交大片免费看中文网站| 亚洲成人av一区二区三区| 国产精品久久久久久久久晋中| 欧美一区二区日韩| 欧美午夜一区二区| 91一区二区三区在线播放| 国产精品一区一区| 蜜臀av性久久久久av蜜臀妖精| 亚洲综合色视频| 国产精品久久久久久久久免费桃花 | 日韩女优av电影| 91电影在线观看| av电影在线不卡| 不卡av电影在线播放| 国产乱国产乱300精品| 麻豆成人久久精品二区三区红| 亚洲综合免费观看高清在线观看| 欧美国产日韩一二三区| 国产午夜一区二区三区| 欧美成va人片在线观看| 日韩精品一区二区三区蜜臀| 91精品欧美久久久久久动漫 | 亚洲成人你懂的| 亚洲一区二区四区蜜桃| 一区二区免费在线播放| 亚洲欧美一区二区三区久本道91 | 日本中文字幕一区二区视频 | 亚洲一级二级三级| 一区二区三区蜜桃| 午夜欧美电影在线观看| 亚洲图片欧美色图| 亚洲v日本v欧美v久久精品| 性久久久久久久久久久久| 亚洲线精品一区二区三区| 亚洲一区二区三区爽爽爽爽爽| 亚洲精品久久嫩草网站秘色| 亚洲精品国产无套在线观| 亚洲精品第一国产综合野| 一区二区三国产精华液| 天天影视涩香欲综合网| 久久99国产精品麻豆| 高清不卡在线观看| 色哟哟精品一区| 欧美日韩精品系列| 日韩免费性生活视频播放| 久久久高清一区二区三区| 欧美国产欧美综合| 亚洲欧美日韩国产一区二区三区| 亚洲美腿欧美偷拍| 美女精品自拍一二三四| 国产成a人亚洲精| 在线免费观看不卡av| 欧美日韩www| 精品卡一卡二卡三卡四在线| 国产精品丝袜黑色高跟| 亚洲最大成人网4388xx| 日韩高清在线观看| 国产精品一区二区在线看| 色综合久久久久综合体| 欧美丰满少妇xxxxx高潮对白| 日韩精品一区在线| 亚洲欧美在线观看| 美女视频黄久久| 99久久国产综合精品麻豆| 欧美一区二区三区不卡| 中文子幕无线码一区tr| 视频在线在亚洲| 成人黄色av网站在线| 91精品欧美一区二区三区综合在| 亚洲国产电影在线观看| 午夜av一区二区| jizz一区二区| 欧美不卡一区二区| 一区二区三区在线免费视频| 国产一区二区电影| 欧美美女一区二区在线观看| 国产精品天干天干在观线| 蜜桃av噜噜一区| 欧美日韩一区二区欧美激情 | 天堂蜜桃91精品| 97久久超碰国产精品| 久久你懂得1024| 日本不卡一区二区| 在线观看亚洲一区| 国产精品毛片大码女人| 久久精品噜噜噜成人av农村| 欧美在线影院一区二区| 国产精品美女久久久久aⅴ| 激情文学综合网| 91精品欧美久久久久久动漫| 亚洲综合成人在线| 波多野洁衣一区| 国产欧美中文在线| 国产一区二区女| 久久综合久色欧美综合狠狠| 男人的天堂亚洲一区| 欧美日韩一区二区在线观看视频| 国产精品视频一区二区三区不卡 | 免费成人在线观看| 欧美午夜精品一区| 亚洲免费资源在线播放| www.亚洲在线| 国产精品蜜臀av| av福利精品导航| 亚洲特级片在线| 波多野洁衣一区| 曰韩精品一区二区| 欧美自拍偷拍一区| 亚洲国产日韩综合久久精品| 91国偷自产一区二区三区观看| 亚洲欧美日韩在线| 色婷婷av久久久久久久| 一级中文字幕一区二区| 欧美探花视频资源| 亚洲成人福利片|