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

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

?? zl5011xrtp.c

?? Zalink50114----TDMoIP芯片驅動源碼
?? C
?? 第 1 頁 / 共 4 頁
字號:
    zl5011xParams  Pointer to the structure for this device instance
    rtpInterval   Interrupt interval in ms

 Outputs:
   None

 Returns:
   zlStatusE

 Remarks:
   None

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

extern zlStatusE zl5011xRtpSetInterruptPeriod(zl5011xParamsS *zl5011xParams,
      Uint32T rtpInterval)
{
   zlStatusE status = ZL5011X_OK;

   ZL5011X_TRACE(ZL5011X_RTP_FN_ID,
         "zl5011xRtpSetInterruptPeriod: %d",
         rtpInterval, 0, 0, 0, 0, 0);

   if ((rtpInterval & ~ZL5011X_RTP_INTERVAL_MASK) != 0)
   {
      status = ZL5011X_PARAMETER_INVALID;
   }
   else
   {
      /* Set interval field as required and upper bits bits to ZERO setting
         randomising feature OFF */
      status = zl5011xWrite(zl5011xParams,
            ZL5011X_RTP_CONFIG2,
            rtpInterval << ZL5011X_RTP_INTERVAL_BITS);

      /* update structure */
      zl5011xParams->rtp.rtpInterval = rtpInterval;
   }

   if (status == ZL5011X_OK)
   {
      /* enable the interrupt statistics */
      status = zl5011xReadModWrite(zl5011xParams, ZL5011X_RTP_CONFIG0,
            ZL5011X_1BIT_MASK << ZL5011X_RTP_CPU_SETUP_DONE,
            ZL5011X_1BIT_MASK << ZL5011X_RTP_CPU_SETUP_DONE);
   }

   return(status);
}

/*******************************************************************************
 Function:
    zl5011xRtpEnableReporting

 Description:
      Enables reporting and enables the interrupt

 Inputs:
    zl5011xParams      Pointer to the structure for this device instance

 Outputs:
   None

 Returns:
   zlStatusE

 Remarks:
   None

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

extern zlStatusE zl5011xRtpEnableReporting(zl5011xParamsS *zl5011xParams)
{
   zlStatusE status = ZL5011X_OK;
   Uint32T rtpMask;

   ZL5011X_TRACE(ZL5011X_RTP_FN_ID, "zl5011xRtpEnableReporting:", 0, 0, 0, 0, 0, 0);

   /*       Enable the interrupt & set mode.*/
   rtpMask = (ZL5011X_1BIT_MASK << ZL5011X_RTPS_INT_MASK_BIT) |
         (ZL5011X_1BIT_MASK << ZL5011X_RTP_FORMAT);

   status = zl5011xReadModWrite(zl5011xParams, ZL5011X_RTP_CONFIG0, 0, rtpMask);

   zl5011xParams->interruptMasks.rtpInterruptEnabled = ZL5011X_TRUE;

   return(status);
}

/*******************************************************************************
 Function:
    zl5011xRtpDisableReporting

 Description:
      Disables the interrupt.

 Inputs:
    zl5011xParams      Pointer to the structure for this device instance

 Outputs:
   None

 Returns:
   zlStatusE

 Remarks:
   None

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

extern zlStatusE zl5011xRtpDisableReporting(zl5011xParamsS *zl5011xParams)
{
   zlStatusE status = ZL5011X_OK;
   Uint32T rtpAddress=ZL5011X_RTP_CONFIG0;

   ZL5011X_TRACE(ZL5011X_RTP_FN_ID, "zl5011xRtpDisableReporting:", 0, 0, 0, 0, 0, 0);

   /*       Disable the interrupt.*/
   status = zl5011xReadModWrite(zl5011xParams, rtpAddress,
         ZL5011X_1BIT_MASK <<ZL5011X_RTPS_INT_MASK_BIT,
         ZL5011X_1BIT_MASK <<ZL5011X_RTPS_INT_MASK_BIT);

   zl5011xParams->interruptMasks.rtpInterruptEnabled = ZL5011X_FALSE;

   return(status);
}

/*******************************************************************************
 Function:
    zl5011xRtpSetHeader

 Description:
      If a context is active, then only the shadow header should be modified.
      The structure contains the enable / disable state and the position of the
      fields that can be added by the Rtp.
         i.e.
         Timestamp size and position - RTP
         Timestamp increment - RTP
         sequence number position - RTP
         length position - UDP
         checksum position - UDP
      The RtpHeaderFieldsS and the header info are stored in the device structure.
      For device variants with a TDM interface this always modifies the header
      that is not currently in use. Other devices modify the active one.

 Inputs:
    zl5011xParams      Pointer to the structure for this device instance
      context         Selected context
      RtpHeaderFieldsS - header data and position of dynamic fields

 Outputs:
   None

 Returns:
   zlStatusE

 Remarks:
   The shadow header must be set before calling this function

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

extern zlStatusE zl5011xRtpSetHeader(zl5011xParamsS *zl5011xParams,
      Uint32T context,
      zl5011xPacketTxHighHeaderS *pFieldPositions)
{
   zlStatusE status = ZL5011X_OK;
   zl5011xContextHeaderSwitchE primaryOrSecondary;
   Uint32T headerAddress;
   Uint32T rtpData= 0, byteAsWord=0 ;
   Uint8T byteCount= 0;

   ZL5011X_TRACE_CONTEXT(ZL5011X_RTP_FN_ID, context, "zl5011xRtpSetHeader: ctxt %3d",
              context, 0, 0, 0, 0, 0);

   /* New header will be written into shadow header so find out which one this is */
   primaryOrSecondary= zl5011xParams->packetIf.packetTx.txHeader[context].shadowHeader;

   status = zl5011xRtpGetHeaderAddress(zl5011xParams, context, primaryOrSecondary,
                                       &headerAddress);

   if (status == ZL5011X_OK)
   {
      /* check the packet length is valid */
      if ((pFieldPositions->txHighLength & ~(ZL5011X_4BIT_MASK << ZL5011X_1BIT_MASK)) != 0)
      {
          status = ZL5011X_PKT_HEADER_SIZE_ERROR;
      }
   }

   if (status == ZL5011X_OK)
   {
      if (pFieldPositions == NULL)
      {
         status = ZL5011X_PARAMETER_INVALID;
      }
   }

   /* write 24byte block to header */
   for( byteCount= 0; byteCount < ZL5011X_RTP_HIGH_HEADER_MAX_LEN; byteCount++)
   {
      if (status != ZL5011X_OK)
         break;

      byteAsWord= pFieldPositions->txHighData[byteCount] << (8 * (byteCount % ZL5011X_NUM_BYTES_IN_WORD));

      rtpData= rtpData | byteAsWord;

      if ( (byteCount % ZL5011X_NUM_BYTES_IN_WORD)==
            (ZL5011X_NUM_BYTES_IN_WORD- sizeof(Uint8T)))
      {
         status = zl5011xWrite(zl5011xParams, headerAddress, rtpData);
         headerAddress+= sizeof( Uint32T);
         rtpData= 0;
      }
   }

   /* write field positions to header - lower word first */
   if (status == ZL5011X_OK)
   {
      if (pFieldPositions->layer5Timestamp32bit == ZL5011X_TRUE)
      {
          rtpData = ZL5011X_1BIT_MASK << ZL5011X_RTP_TS;
      }

      if (pFieldPositions->layer5SequenceNum16bit == ZL5011X_TRUE)
      {
          rtpData |= ZL5011X_1BIT_MASK << ZL5011X_RTP_SS;
      }

      if (pFieldPositions->firstHighHeader == ZL5011X_FALSE)
      {
          rtpData |= ZL5011X_1BIT_MASK << ZL5011X_RTP_CSW;
      }

      /* packet length was checked on entry, so just use it now */
       rtpData |= (pFieldPositions->txHighLength / 2) << ZL5011X_RTP_HDR_LEN;
   }

   if (status == ZL5011X_OK)
   {
      if (pFieldPositions->highSilenceCtrl >  ZL5011X_2BIT_MASK)
      {
          status= ZL5011X_PARAMETER_INVALID;
      }
      else
      {
          rtpData |= pFieldPositions->highSilenceCtrl << ZL5011X_RTP_CTRL;
      }
   }

   if (status == ZL5011X_OK)
   {
      if ( pFieldPositions->highContextOut >  ZL5011X_13BIT_MASK)
      {
          status= ZL5011X_PARAMETER_INVALID;
      }
      else
      {
          rtpData |= pFieldPositions->highContextOut << ZL5011X_RTP_CTXT_OUT;
      }
   }

   if (status == ZL5011X_OK)
   {
      /* write lower word and increment to next word of field positions */
      status = zl5011xWrite(zl5011xParams, headerAddress, rtpData);

      headerAddress+= sizeof(Uint32T);
      rtpData= 0;
   }

   if (status == ZL5011X_OK)
   {
      if ( pFieldPositions->layer5TimestampIncrement >  ZL5011X_13BIT_MASK)
      {
         if (pFieldPositions->layer5TimestampFromWan != ZL5011X_TRUE)
         {
            status = ZL5011X_PARAMETER_INVALID;
         }
      }
      else
      {
          rtpData |= pFieldPositions->layer5TimestampIncrement << ZL5011X_RTP_TS_INC;
      }
   }

   if (status == ZL5011X_OK)
   {
      if (pFieldPositions->layer5TimestampEnable == ZL5011X_TRUE)
      {
         if ((pFieldPositions->layer5TimestampPos & ~(ZL5011X_4BIT_MASK << ZL5011X_1BIT_MASK)) != 0)
         {
             status = ZL5011X_PARAMETER_INVALID;
         }
         else
         {
            /* check that the timestamp is in a valid position and aligned to a 16 / 32
               bit boundary for 16 / 32 bit size respectively */
            if (((pFieldPositions->layer5Timestamp32bit == ZL5011X_TRUE) &&
                  ((pFieldPositions->layer5TimestampPos > (ZL5011X_RTP_HIGH_HEADER_MAX_LEN - sizeof(Uint32T))) ||
                  ((pFieldPositions->layer5TimestampPos & ZL5011X_2BIT_MASK) != 0))) ||
                  ((pFieldPositions->layer5Timestamp32bit == ZL5011X_FALSE) &&
                  ((pFieldPositions->layer5TimestampPos > (ZL5011X_RTP_HIGH_HEADER_MAX_LEN - sizeof(Uint16T))) &&
                  ((pFieldPositions->layer5TimestampPos & ZL5011X_1BIT_MASK) != 0))))
            {
               status = ZL5011X_PARAMETER_INVALID;
            }
            else
            {
               rtpData |= (pFieldPositions->layer5TimestampPos / 2) << ZL5011X_RTP_TS_LOC;

               /* Enable the control for obtaining timestamp from the Wan interface */
               if (pFieldPositions->layer5TimestampFromWan == ZL5011X_TRUE)
               {
                  rtpData |= ZL5011X_1BIT_MASK << ZL5011X_RTP_CES_LOC;
               }
            }
         }
      }
      else /* indicate 'disabled' */
      {
          rtpData |= ZL5011X_4BIT_MASK << ZL5011X_RTP_TS_LOC;
      }

   }

   if (status == ZL5011X_OK)
   {
      if (  pFieldPositions->layer4LengthEnable== ZL5011X_TRUE)
      {
         if ((pFieldPositions->layer4LengthPos & ~(ZL5011X_4BIT_MASK << ZL5011X_1BIT_MASK)) != 0)
         {
             status= ZL5011X_PARAMETER_INVALID;
         }
         else
         {
            if (pFieldPositions->layer4LengthPos > (ZL5011X_RTP_HIGH_HEADER_MAX_LEN - sizeof(Uint16T)))
            {
               status = ZL5011X_PARAMETER_INVALID;
            }
            else
            {
               rtpData |= (pFieldPositions->layer4LengthPos / 2) << ZL5011X_RTP_LEN_LOC;
            }
         }
      }
      else /* indicate 'disabled' */
      {
          rtpData |= ZL5011X_4BIT_MASK << ZL5011X_RTP_LEN_LOC;
      }
   }

   if (status == ZL5011X_OK)
   {
      if (  pFieldPositions->layer4ChecksumEnable== ZL5011X_TRUE)
      {
         if ((pFieldPositions->layer4ChecksumPos & ~(ZL5011X_4BIT_MASK << ZL5011X_1BIT_MASK)) != 0)
         {
             status= ZL5011X_PARAMETER_INVALID;
         }
         else
         {
            if (pFieldPositions->layer4ChecksumPos > (ZL5011X_RTP_HIGH_HEADER_MAX_LEN - sizeof(Uint16T)))
            {
               status = ZL5011X_PARAMETER_INVALID;
            }
            else
            {
               rtpData |= (pFieldPositions->layer4ChecksumPos / 2) << ZL5011X_RTP_CHK_LOC;
            }
         }
      }
      else /* indicate 'disabled' */
      {
          rtpData |= ZL5011X_4BIT_MASK << ZL5011X_RTP_CHK_LOC;
      }
   }

   if (status == ZL5011X_OK)
   {
      if (pFieldPositions->layer5SequenceNumEnable == ZL5011X_TRUE)
      {
         if (pFieldPositions->layer5SequenceNumPos >  ZL5011X_5BIT_MASK)
         {
             status= ZL5011X_PARAMETER_INVALID;
         }
         else
         {
            if (((pFieldPositions->layer5SequenceNum16bit == ZL5011X_TRUE) &&
                  (pFieldPositions->layer5SequenceNumPos > (ZL5011X_RTP_HIGH_HEADER_MAX_LEN - sizeof(Uint16T)))) ||
                  ((pFieldPositions->layer5SequenceNum16bit == ZL5011X_FALSE) &&
                  (pFieldPositions->layer5SequenceNumPos > (ZL5011X_RTP_HIGH_HEADER_MAX_LEN - sizeof(Uint8T)))))
            {
               status = ZL5011X_PARAMETER_INVALID;
            }
            else
            {
               rtpData |= pFieldPositions->layer5SequenceNumPos << ZL5011X_RTP_SN_LOC;
            }
         }
      }
      else /* indicate 'disabled' */
      {
          rtpData |= ZL5011X_5BIT_MASK << ZL5011X_RTP_SN_LOC;
      }
   }

   if (status == ZL5011X_OK)
   {
      /* write upper word of field positions */
      status = zl5011xWrite(zl5011xParams, headerAddress, rtpData);
   }

   if (status == ZL5011X_OK)
   {
       /* Keep a copy of the data written */
      (void*)memcpy(&(zl5011xParams->packetIf.packetTx.txHeader[context].highHeader[primaryOrSecondary]),
            pFieldPositions, sizeof(zl5011xPacketTxHighHeaderS));
   }

   return status;
}

/*******************************************************************************
 Function:
    zl5011xRtpSeedTimestamp

 Description:
      This is used to set the RTP timestamp initial value.
      The value can be set using the set header function, but for tight control,
      this function allows the field to be set independently. This will probably
      only be necessary when in async mode and using RTP based differential
      clocking, where the PAC Rx count is used to generate the RTP Tx timestamp.
      So, in this case, the timestamp would be seeded immediately before enabling
      the context.

 Inputs:
    zl5011xParams      Pointer to the structure for this device instance
      context         Selected context
      timestamp       Initial timestamp value

 Outputs:
   None

 Returns:
   zlStatusE

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲综合一二三区| 国产三级精品三级在线专区| 92国产精品观看| 国产99久久久国产精品潘金 | 欧美肥妇bbw| 欧美影院精品一区| 欧美日韩免费电影| 91精品婷婷国产综合久久性色 | 国内精品伊人久久久久av影院 | 国内外精品视频| 国产专区综合网| 欧美视频一区二区三区在线观看 | 欧美激情综合网| 日本一区二区三区国色天香| 久久精品亚洲乱码伦伦中文| 日本一区二区电影| 亚洲综合在线五月| 欧美96一区二区免费视频| 日本怡春院一区二区| 国产美女娇喘av呻吟久久| 丰满少妇在线播放bd日韩电影| 成人精品免费视频| 91视频免费观看| 欧美日本一区二区三区四区| 欧美大片日本大片免费观看| 国产蜜臀97一区二区三区| 亚洲综合精品自拍| 久久成人av少妇免费| 99这里都是精品| 日韩三级免费观看| 日本一区二区成人在线| 偷拍自拍另类欧美| 国产很黄免费观看久久| 欧美吞精做爰啪啪高潮| 久久亚洲精精品中文字幕早川悠里 | 精品国产免费人成在线观看| 国产精品美女久久福利网站| 三级成人在线视频| 国产·精品毛片| 制服丝袜中文字幕亚洲| 亚洲国产精品精华液ab| 麻豆成人综合网| 欧美性猛交xxxxxxxx| 久久久精品日韩欧美| 亚洲国产色一区| 成人性生交大片免费看在线播放| 欧美久久久久久蜜桃| 亚洲三级视频在线观看| 国产成人在线电影| 欧美一卡2卡三卡4卡5免费| 亚洲乱码国产乱码精品精98午夜| 美女视频一区二区三区| 欧美撒尿777hd撒尿| 国产精品入口麻豆九色| 国内精品免费**视频| 5858s免费视频成人| 亚洲免费在线播放| eeuss鲁片一区二区三区| 精品久久免费看| 日本一道高清亚洲日美韩| 欧美午夜精品一区| 1000部国产精品成人观看| 国产福利精品一区| 久久久久久久久伊人| 精品一区二区三区在线观看| 欧美一区二区三区系列电影| 亚洲一区二区三区四区五区黄| 91在线看国产| 亚洲日本在线观看| 一本大道综合伊人精品热热| 自拍偷拍亚洲欧美日韩| 91免费看片在线观看| 韩国v欧美v亚洲v日本v| 日韩精品中文字幕在线不卡尤物| 亚洲一区二区三区四区的| 在线观看视频91| 亚洲永久免费视频| 3d成人动漫网站| 免费久久精品视频| 精品久久人人做人人爰| 国产91丝袜在线播放| 国产精品福利一区二区| 99re亚洲国产精品| 一区二区久久久久久| 欧美日韩中文另类| 日韩精品一级二级| 精品美女在线观看| 国产白丝网站精品污在线入口| 中文字幕av资源一区| 91麻豆高清视频| 亚洲h动漫在线| 欧美成人综合网站| 丁香婷婷深情五月亚洲| 亚洲精品videosex极品| 欧美日韩电影在线播放| 精彩视频一区二区三区| 国产精品视频yy9299一区| 色婷婷av一区二区| 免费成人深夜小野草| 中文字幕不卡在线| 欧美日韩精品免费| 国产乱码精品一区二区三区av | 琪琪久久久久日韩精品| 精品日韩99亚洲| 成人精品视频一区二区三区| 亚洲精品国产无天堂网2021| 日韩一区二区三区免费看 | 久久精品亚洲精品国产欧美kt∨| 99久久精品国产一区| 天堂久久久久va久久久久| 久久久久一区二区三区四区| 一本高清dvd不卡在线观看| 久久久99久久| 色综合网站在线| 麻豆成人在线观看| 亚洲日本免费电影| 久久一夜天堂av一区二区三区 | 亚洲一区二区三区四区在线| 精品乱码亚洲一区二区不卡| 色婷婷综合在线| 国产综合久久久久久鬼色| 亚洲777理论| 国产精品国产三级国产aⅴ无密码 国产精品国产三级国产aⅴ原创 | 夜夜精品视频一区二区| 精品卡一卡二卡三卡四在线| 在线精品观看国产| 国产成人av福利| 麻豆精品在线播放| 性做久久久久久免费观看| 中日韩免费视频中文字幕| 精品理论电影在线观看| 欧美日韩国产精品自在自线| 欧美一区二区三区视频在线| 欧美亚洲国产bt| av在线一区二区三区| 激情综合色丁香一区二区| 日本成人在线看| 午夜精品福利视频网站| 亚洲女性喷水在线观看一区| 国产精品拍天天在线| 久久亚洲一级片| 精品国产欧美一区二区| 欧美一区二区黄| 日韩欧美专区在线| 51精品视频一区二区三区| 欧美日韩精品欧美日韩精品一| 色香色香欲天天天影视综合网| 成人教育av在线| 不卡的av电影| 99久久久免费精品国产一区二区 | 亚洲成人福利片| 一区二区三国产精华液| 亚洲精品少妇30p| 伊人婷婷欧美激情| 亚洲美女屁股眼交3| 亚洲综合色在线| 丝袜诱惑制服诱惑色一区在线观看 | 国产三级久久久| 国产精品日韩精品欧美在线| 国产精品乱人伦| 中文字幕日韩av资源站| 亚洲视频在线观看一区| 亚洲激情在线激情| 午夜精品福利久久久| 开心九九激情九九欧美日韩精美视频电影 | 丝袜美腿亚洲色图| 美腿丝袜亚洲色图| 国产精品一区二区果冻传媒| 国产精品正在播放| 99精品欧美一区二区三区综合在线| 99久久婷婷国产综合精品| 色综合 综合色| 欧美一区二区三区在线视频| 久久久久久久电影| 亚洲视频在线一区| 日本美女一区二区| 成人性视频免费网站| 欧美吻胸吃奶大尺度电影| 精品国精品国产| 亚洲精品中文在线观看| 奇米在线7777在线精品 | 亚洲男女一区二区三区| 亚洲va韩国va欧美va精品 | 亚洲免费资源在线播放| 香港成人在线视频| 国产精品69毛片高清亚洲| 欧美特级限制片免费在线观看| 欧美mv和日韩mv的网站| 自拍视频在线观看一区二区| 污片在线观看一区二区| 丰满少妇在线播放bd日韩电影| 欧美日韩另类国产亚洲欧美一级| 2022国产精品视频| 亚洲第一在线综合网站| 国产69精品久久久久毛片| 91精品国产综合久久久久| 中文字幕第一区第二区| 美女被吸乳得到大胸91| 色av一区二区| 国产精品区一区二区三|