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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? zl5011xptx.c

?? Zalink50114----TDMoIP芯片驅(qū)動源碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*******************************************************************************
*
*  File name:              zl5011xPtx.c
*
*  Version:                16
*
*  Author:                 MRC
*
*  Date created:           11/04/2002
*
*  Copyright 2002, 2003, 2004, 2005, Zarlink Semiconductor Limited.
*  All rights reserved.
*
*  Module Description:
*
*  This file contains all the functions that will initialise and control
*  the Ptx block. The Ptx can manage the headers for all of the contexts
*  plus a further 16 for host flows.
*  For context data flows, the PTX adds a header, which is nominally the
*  ethernet and IP headers (provides features to control the length and
*  checksum).
*  A further 16 MPID's are required for host to Lan packet transmission
*  (one for each port / queue combination), and the header is not
*  attached for these.
*
*  Revision History:
*
*  Rev:  Date:       Author:  Comments:
*  1     11/04/2002  MRC      Creation
*  2     22/04/2002  MRC      The table base address register needed the value
*                             in 64 bit fields, that is divided by 8.
*  3     22/04/2002  MRC      Fixed address problem in loop in set header fn
*  4     22/04/2002  MRC      Initialised the host table entries
*  5     24/04/2002  MRC      the number of context headers and the size of
*                             headers are now parameters to configure.
*  6     26/04/2002  MRC      Changed some data names in response to comments
*                             from Thomas, regarding the MIB interface.
*  7     29/04/2002  MRC      Changes following code review.
*  8     07/05/2002  MRC      Changed enum to use uppercase
*                             P(acketTxHeaderModeE).
*  9     19/06/2002  MRC      Updated following block change
*  10    20/06/2002  MRC      Updated
*  11    31/07/2002  MRC      Changed the return code for header size error in
*                             set header fn
*  12    31/10/2002  MRC      Added variants + minor fixes
*  13    03/04/2003  MRC      When a header is disabled, the length field is
*                             also cleared out.
*  14    09/06/2003  DJA      Performed pre-audit actions
*  15    04/05/2005  APL      Clear header descriptors on initialisation.
*                             Added zl5011xPtxEnableSrcMacOverwrite function.
*  16    06/05/2005  APL      Minor fix to initialisation in zl5011xPtxConfigure
*
*******************************************************************************/

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

#include "zl5011x.h"
#include "zl5011xPtx.h"
#include "zl5011xPtxMap.h"
#include "zl5011xUtilLib.h"

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

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

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

 Function:
    zl5011xPtxInit

 Description:
    This function initialises the Ptx block and data structure.

 Inputs:
    zl5011xParams      Pointer to the structure for this device instance

 Outputs:
    None

 Returns:
   zlStatusE

 Remarks:
    None

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

zlStatusE zl5011xPtxInit(zl5011xParamsS *zl5011xParams)
{
   zlStatusE status = ZL5011X_OK;

   ZL5011X_TRACE(ZL5011X_PTX_FN_ID, "zl5011xPtxInit:", 0, 0, 0, 0, 0, 0);

   /* The PTX block itself needs no initialisation */

   return(status);
}

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

 Function:
    zl5011xPtxConfigure

 Description:
    This function initialises the header descriptors. This disables header
    attachment and source MAC overwrite for all normal and host contexts

 Inputs:
   zl5011xParams   Pointer to the structure for this device instance

 Outputs:
    None

 Returns:
   zlStatusE

 Remarks:
   None

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

zlStatusE zl5011xPtxConfigure(zl5011xParamsS *zl5011xParams)
{
   zlStatusE status = ZL5011X_OK;
   Uint32T ptxCtrlAddress;
   Uint32T *ptxCtrlPtr;
   Uint32T loop;

   ZL5011X_TRACE(ZL5011X_PTX_FN_ID,
         "zl5011xPtxConfigure:",
         0, 0, 0, 0, 0, 0);

   /* Get the address of the first header descriptor */
   status = zl5011xPtxGetTableAddress(zl5011xParams, 0, &ptxCtrlAddress);

   ptxCtrlPtr = (Uint32T*)ptxCtrlAddress;

   for (loop = 0; loop < (ZL5011X_PKT_TX_NUM_CONTEXT_HEADERS + ZL5011X_PKT_TX_NUM_HOST_HEADERS) &&
                         (status == ZL5011X_OK); loop++)
   {
      /* Zero the memory using 32-bit writes.
         Each descriptor is 8 bytes long so two writes required */
      if (status == ZL5011X_OK)
      {
         status = zl5011xWrite(zl5011xParams, (Uint32T)ptxCtrlPtr, 0x00);
         ptxCtrlPtr++;
      }
      if (status == ZL5011X_OK)
      {
         status = zl5011xWrite(zl5011xParams, (Uint32T)ptxCtrlPtr, 0x00);
         ptxCtrlPtr++;
      }
   }

   return(status);
}

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

 Function:
    zl5011xPtxEnableHeaderInsertion

 Description:
    Controls whether the PTX attaches a header to the data or not.

 Inputs:
    zl5011xParams     Pointer to the structure for this device instance
    tableEntry       entry in the table to disable header insertion for
    enable           ZL5011X_TRUE to allow the PTX to add the header
                     ZL5011X_FALSE to pass the data through without adding a header

 Outputs:
    None

 Returns:
   zlStatusE

 Remarks:
   This function will not normally be used as header insertion is controlled
   using zl5011xPtxSetHeader function but is retained for backward compatibility

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

zlStatusE zl5011xPtxEnableHeaderInsertion(zl5011xParamsS *zl5011xParams,
      Uint32T tableEntry, zl5011xBooleanE enable)
{
   zlStatusE status = ZL5011X_OK;
   Uint32T tableAddr, bits, bitMask;

   ZL5011X_TRACE(ZL5011X_PTX_FN_ID,
         "zl5011xPtxEnableHeaderInsertion: entry %3d, enable %d",
         tableEntry, enable, 0, 0, 0, 0);

   /* check that the table entry is a valid number. Note host contexts do not support header insertion */
   if (tableEntry >= ZL5011X_PKT_TX_NUM_CONTEXT_HEADERS)
   {
      status = ZL5011X_PARAMETER_INVALID;
   }

   if (status == ZL5011X_OK)
   {
      status = zl5011xPtxGetTableAddress(zl5011xParams, tableEntry, &tableAddr);
   }

   if (status == ZL5011X_OK)
   {
      /* set the bit to enable the header to be attached */
      if (enable == ZL5011X_TRUE)
      {
         bitMask = ZL5011X_1BIT_MASK << ZL5011X_PTX_ENABLE_HEADER_BIT;
         bits = bitMask;
      }
      else
      {
         /* must also clear out the length field to allow packet to be sent
            without a header attached */
         bits = 0;
         bitMask = (ZL5011X_1BIT_MASK << ZL5011X_PTX_ENABLE_HEADER_BIT) |
               (ZL5011X_PTX_HEADER_LENGTH_MASK << ZL5011X_PTX_HEADER_LENGTH_BITS);
      }

      status = zl5011xReadModWrite(zl5011xParams, tableAddr, bits, bitMask);
   }

   return(status);
}

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

 Function:
    zl5011xPtxEnableSrcMacOverwrite

 Description:
    Controls whether the PTX overwrites the outgoing packet source MAC address
    with the device MAC address.

 Inputs:
    zl5011xParams     Pointer to the structure for this device instance
    context          Context number for the header to control
    enable           ZL5011X_TRUE to make the PTX overwrite the source MAC
                     ZL5011X_FALSE to pass the data through with the source MAC
                        unchanged

 Outputs:
    None

 Returns:
   zlStatusE

 Remarks:
   Will normally be used only for host contexts as normal contexts are controlled
   using zl5011xPtxSetHeader function

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

zlStatusE zl5011xPtxEnableSrcMacOverwrite(zl5011xParamsS *zl5011xParams,
      Uint32T context, zl5011xBooleanE enable)
{
   zlStatusE status = ZL5011X_OK;
   Uint32T descriptorAddr, bits, bitMask;

   ZL5011X_TRACE(ZL5011X_PTX_FN_ID,
         "zl5011xPtxEnableSrcMacOverwrite: context %3d, enable %d",
         context, enable, 0, 0, 0, 0);

   /* check that the context is a valid normal or host context number */
   if (context >= (ZL5011X_PKT_TX_NUM_CONTEXT_HEADERS + ZL5011X_PKT_TX_NUM_HOST_HEADERS))
   {
      status = ZL5011X_PARAMETER_INVALID;
   }

   if (status == ZL5011X_OK)
   {
      status = zl5011xPtxGetTableAddress(zl5011xParams, context, &descriptorAddr);
   }

   if (status == ZL5011X_OK)
   {
      bitMask = ZL5011X_1BIT_MASK << ZL5011X_PTX_SRC_ADDR_FROM_MAC_BIT;
      if (enable == ZL5011X_TRUE)
      {  /* set the bit to enable the MAC address to be overwritten */
         bits = bitMask;
      }
      else
      {  /* clear the bit */
         bits = 0;
      }

      status = zl5011xReadModWrite(zl5011xParams, descriptorAddr, bits, bitMask);
   }

   return(status);
}

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

 Function:
    zl5011xPtxGetTableAddress

 Description:
   Returns the base address of the control header for the required context.

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美国产三级| 精品美女一区二区三区| 亚洲精选视频在线| 日本久久电影网| 午夜精品久久久久久久99樱桃| 欧美综合色免费| 午夜久久电影网| 欧美成人官网二区| 国产精品自拍毛片| 最新热久久免费视频| 91麻豆国产精品久久| 亚洲第一综合色| 欧美成人精品3d动漫h| 国产成人av电影在线播放| 亚洲欧洲一区二区在线播放| 91性感美女视频| 青青草视频一区| 国产午夜精品一区二区三区视频| 成人福利视频网站| 亚洲国产精品久久人人爱| 欧美sm美女调教| 成人午夜电影小说| 日韩精品一二区| 久久久欧美精品sm网站| 日本精品一区二区三区高清| 日韩高清欧美激情| 国产精品色眯眯| 欧美精品日韩一本| 成人手机电影网| 午夜日韩在线电影| 国产精品拍天天在线| 欧美视频一区在线| 成人午夜激情片| 蜜臀av性久久久久蜜臀av麻豆| 国产精品欧美一区喷水| 91精品国产综合久久久蜜臀粉嫩| 国产suv一区二区三区88区| 亚洲国产日韩av| 中文字幕一区二区不卡| 欧美本精品男人aⅴ天堂| 在线一区二区三区四区五区| 韩国视频一区二区| 亚洲一区二区视频| 中文字幕免费不卡| 精品国产乱码久久久久久蜜臀| 91福利视频久久久久| 国产白丝精品91爽爽久久| 视频一区视频二区中文字幕| 国产精品色在线观看| 2023国产精华国产精品| 欧美日韩精品专区| 99久久99久久综合| 国产福利一区二区| 男男视频亚洲欧美| 亚洲高清中文字幕| 亚洲乱码国产乱码精品精的特点 | 99视频超级精品| 激情综合网最新| 性久久久久久久| 夜夜揉揉日日人人青青一国产精品| 久久九九99视频| 久久天堂av综合合色蜜桃网| 91精品国产91久久久久久一区二区 | 成人欧美一区二区三区在线播放| 精品国产网站在线观看| 在线播放一区二区三区| 欧美综合色免费| 欧美日韩亚洲高清一区二区| 日本道精品一区二区三区| 色婷婷综合中文久久一本| 99精品视频中文字幕| 不卡的av电影| 成人高清视频免费观看| 国产成人丝袜美腿| 大美女一区二区三区| 丁香天五香天堂综合| 国产成人8x视频一区二区 | 成人精品国产免费网站| 成人一道本在线| 99精品久久99久久久久| 丁香五精品蜜臀久久久久99网站| 国产精品一二三在| 成人精品一区二区三区四区| 国产成人久久精品77777最新版本| 国产一区二区三区免费播放| 国产精品123区| 成人午夜视频网站| 一道本成人在线| 欧美精品一卡两卡| 日韩欧美成人激情| 国产亚洲成av人在线观看导航| 国产欧美一区二区在线观看| 国产精品无圣光一区二区| 中文字幕视频一区| 亚洲国产精品尤物yw在线观看| 日韩国产在线观看一区| 韩国欧美一区二区| 91丨九色丨蝌蚪丨老版| 欧美日韩在线直播| 欧美大片拔萝卜| 亚洲国产精品精华液2区45| 亚洲女子a中天字幕| 午夜成人免费视频| 国产精品一区二区男女羞羞无遮挡 | 久久综合久久综合久久综合| 久久精品这里都是精品| 亚洲欧美aⅴ...| 看片的网站亚洲| www.亚洲人| 91精品国产高清一区二区三区蜜臀| 久久婷婷国产综合国色天香| 亚洲欧洲精品一区二区三区不卡| 亚洲成人tv网| 国产成人精品免费一区二区| 色香色香欲天天天影视综合网| 欧美一区日本一区韩国一区| 国产视频在线观看一区二区三区 | 亚洲最新在线观看| 九色porny丨国产精品| 成人黄色av网站在线| 欧美欧美午夜aⅴ在线观看| 国产性天天综合网| 亚洲h动漫在线| 成人午夜激情视频| 欧美一区二区久久久| 中文字幕精品三区| 日本vs亚洲vs韩国一区三区| av成人免费在线| 久久综合精品国产一区二区三区| 亚洲综合久久av| 福利一区二区在线观看| 7777女厕盗摄久久久| 亚洲免费观看高清完整版在线| 久久99精品久久久久婷婷| 欧美影视一区二区三区| 国产精品麻豆一区二区| 蜜桃视频一区二区| 欧美性受xxxx黑人xyx性爽| 国产精品视频观看| 国产精品一区二区视频| 欧美一区二区日韩| 午夜久久久久久久久久一区二区| 91小视频在线免费看| 久久久国产综合精品女国产盗摄| 视频一区在线视频| 欧美撒尿777hd撒尿| 亚洲欧洲日韩在线| 国产aⅴ综合色| 久久精品一区蜜桃臀影院| 久草在线在线精品观看| 91精品国产综合久久精品app | 久久蜜桃香蕉精品一区二区三区| 日韩在线a电影| 欧美日韩精品电影| 亚洲影院免费观看| 欧洲另类一二三四区| 亚洲男人的天堂在线aⅴ视频| 成人小视频在线观看| 国产欧美日韩不卡| 国产成人自拍高清视频在线免费播放| 欧美一区二区三区视频免费| 午夜精品福利一区二区蜜股av| 日本韩国欧美国产| 亚洲国产婷婷综合在线精品| 欧美一a一片一级一片| 亚洲18色成人| 这里只有精品99re| 日韩一区精品字幕| 日韩精品中午字幕| 狠狠色丁香婷婷综合| 2014亚洲片线观看视频免费| 国产伦精品一区二区三区免费迷| 精品国产露脸精彩对白| 国产精品18久久久久久久网站| 精品黑人一区二区三区久久| 九九精品一区二区| 久久久欧美精品sm网站 | 丁香婷婷综合激情五月色| 日本一区二区电影| 91麻豆文化传媒在线观看| 一区二区三区久久久| 欧美日韩黄视频| 免费黄网站欧美| 久久久亚洲欧洲日产国码αv| 粉嫩嫩av羞羞动漫久久久 | 日韩影院精彩在线| 欧美成人女星排行榜| 成人午夜看片网址| 亚洲精品欧美二区三区中文字幕| 在线免费观看日韩欧美| 秋霞午夜av一区二区三区| 久久久久久久久免费| 成人黄色综合网站| 肉肉av福利一精品导航| 久久看人人爽人人| 欧美网站大全在线观看| 免费亚洲电影在线| 国产精品不卡视频| 欧美色图12p| 国产成人亚洲精品狼色在线|