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

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

?? zl5011xcpu.c

?? Zalink50114----TDMoIP芯片驅(qū)動(dòng)源碼
?? C
?? 第 1 頁 / 共 4 頁
字號(hào):
/*******************************************************************************
*
*  File name:              zl5011xCpu.c
*
*  Version:                34
*
*  Author:                 PJE
*
*  Date created:           21/03/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 CPU block.
*
*  Revision History:
*
*  Rev:  Date:       Author:  Comments:
*  1     25/03/2002  PJE      before spec simplified
*  2     25/03/2002  PJE      compiles OK but CpuInit not finished.
*  3     26/03/2002  PJE      runs.
*  4     27/03/2002  PJE      zl5011xCpuDmaGetRxStatus() more params
*  5     17/04/2002  MRC      Changed the CHECK_.. macros to ZL5011X_CHECK_..
*  6     17/04/2002  MRC      Updated the revision history.
*  7     26/04/2002  MRC      Changed some data names in response to comments
*                             from Thomas, regarding the MIB interface.
*  8     30/04/2002  PJE      missing include file
*  9     15/05/2002  PJE      added function  zl5011xCpuSetTimeoutPeriod()
*  10    15/05/2002  PJE      Minor mods.
*  11    07/06/2002  LCW      Added zl5011xCpuDmaGetRxSeqNum
*  12    11/06/2002  MRC      Minor tweaks
*  13    02/07/2002  PJE      new timeoutperiod item in zl5011xCpuDmaIfS and
*                             cleanup for review.
*  14    12/07/2002  MRC      Rationalised the 2 enums for CPU queues
*  15    16/09/2002  PJE      New zl5011xCpuDmaSetPadding() &
*                             zl5011xCpuDmaSetDreqPolarity debugging.
*                             ..and incorporate them in CpuInit
*  16    23/09/2002  ARW      Renamed zl5011xCpuDmaGetRxStatus to
*                             zl5011xCpuDmaGetRxQueueStatus
*                             Added new functions zl5011xCpuDmaGetRxStatus &
*                             zl5011xCpuDmaGetTxStatus
*  17    26/09/2002  ARW      Renamed zl5011xCpuDmaGetRxQueueStatus to
*                             zl5011xCpuDmaGetRxQueueStatus
*  18    01/10/2002  DJA      File header updated
*                             ZL5011X_TRACE messages fixed up
*  19    07/10/2002  ARW      Added new function: CpuDmaSetDackPolarity
*                             Added new functionality to CpuInit
*                             Changed defaults in CpuInit
*                             Updated zl5011xCpuDmaSetRxControl &
*                             zl5011xCpuDmaSetTxControl
*  20    08/10/2002  PJE      Added new function: zl5011xCpuDmaGetIntrStatus
*  21    11/10/2002  PJE      peer rvw items
*  22    15/10/2002  ARW      Removed ZL5011X_DMA_HI_Z capability from
*                             DmaRxSetControl & DmaTxSetControl
*                             Added a parmaeter to DmaGetTxStatus to make it
*                             more consistant with get DmaGetRxStatus
*                             Swapped the GIF busy bits tested in DmaTxGetStatus
*                             and DmaGetRxStatus
*                             Changed the default set in CpuInit
*  23    16/10/2002  ARW      Inverted 3 bits for the constat register
*  24    23/10/2002  ARW      Function changes to match spec changes
*                               Added new functions for DMA bypass
*  25    31/10/2002  MRC      Added variants + minor fixes
*  26    24/03/2003  ARW      Added extra parameters to functions
*                                 zl5011xCpuDmaPTHWrite & zl5011xCpuDmaPRHRead
*  27    15/04/2003  ARW      Applied byte swapping to fuynctions
*                                 zl5011xCpuDmaPTHWrite & zl5011xCpuDmaPRHRead
*  28    09/06/2003  DJA      Performed pre-audit actions
*  29    05/07/2004  APL      Removed spurious comment
*  30    23/07/2004  MRC      Fixed some compiler warnings
*  31    29/07/2004  MRC      Fixed some compiler warnings
*  32    06/09/2004  APL      Clarified logic for DMA busy processing
*  33    11/02/2005  MRC      Used macros for writing / reading DMA packets
*  34    14/02/2005  MRC      Removed restriction on interrupt selection
*
******************************************************************************/

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

#include "zl5011x.h"
#include "zl5011xCpu.h"
#include "zl5011xCpuMap.h"
#include "zl5011xUtilLib.h"

/*****************   # DEFINES   **********************************************/

/*****************   ENUMERATIONS    ******************************************/
typedef enum zl5011xDmaDeviceAccessTypeE
{
    ZL5011X_DMA_READ_ONLY,
    ZL5011X_DMA_WRITE_ONLY,
    ZL5011X_DMA_READ_WRITE
} zl5011xDmaDeviceAccessTypeE;

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

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

/*****************   STATIC FUNCTION DECLARATIONS *****************************/
static zlStatusE zl5011xCpuDmaStoreConstatRegister(zl5011xParamsS *zl5011xParams,
     Uint32T bits,Uint32T bitMask,zl5011xDmaDeviceAccessTypeE accessType);

/*****************   EXPORTED FUNCTION DEFINTIONS   ***************************/

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

 Function:
    zl5011xCpuInit

 Description:
    This function initialises the block, leaving then DMA disabled.
    Sets the block ID for the CPU.

 Inputs:
    zl5011xParams      Pointer to the structure for this device instance

 Outputs:
    None

 Returns:
   zlStatusE

 Remarks:
    None

*******************************************************************************/
extern zlStatusE zl5011xCpuInit(zl5011xParamsS *zl5011xParams)
{
   zlStatusE status = ZL5011X_OK;

   ZL5011X_TRACE(ZL5011X_CPU_FN_ID, "zl5011xCpuInit:", 0, 0, 0, 0, 0, 0);

   status = zl5011xCpuSetTimeoutPeriod(zl5011xParams,
         ZL5011X_CPU_DEFAULT_TIMEOUT);

   /* Reset the DMA structures dmaParams using fns if possible */
   if(status == ZL5011X_OK)
   {
      status = zl5011xCpuDmaSetDreqPolarity( zl5011xParams, ZL5011X_NEGATIVE);
   }

   if(status == ZL5011X_OK)
   {
      status = zl5011xCpuDmaSetDackPolarity( zl5011xParams, ZL5011X_NEGATIVE);
   }

   if(status == ZL5011X_OK)
   {
      status = zl5011xCpuDmaSetRxMode( zl5011xParams, ZL5011X_DMA_RX_SINGLEPKT);
   }

   if(status == ZL5011X_OK)
   {
      status = zl5011xCpuDmaSetInterruptMode(zl5011xParams,ZL5011X_DMA_NO_INTERRUPT);
   }

   if(status == ZL5011X_OK)
   {
      status = zl5011xCpuDmaSetRxQueue( zl5011xParams, ZL5011X_QUEUE_0);
   }

   if(status == ZL5011X_OK)
   {
      status = zl5011xCpuDmaSetRxControl( zl5011xParams, ZL5011X_DMA_DISABLED);
   }

   if(status == ZL5011X_OK)
   {
      status= zl5011xCpuDmaSetTxControl( zl5011xParams, ZL5011X_DMA_DISABLED);
   }
   if(status == ZL5011X_OK)
   {
      status= zl5011xCpuDmaSetPadding( zl5011xParams, ZL5011X_DMA_NO_PADDING);
   }

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

   return(status);
}

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

 Function:
    zl5011xCpuDmaSetRxMode

 Description:
    This function writes to the device CPU block to set the DMA Rx Mode to
    single packet, empty buffer, empty buffer when it is no longer empty, or
    continuous mode.

 Inputs:
   zl5011xParams   Pointer to the structure for this device instance
   rxMode         Any of: ZL5011X_DMA_RX_SINGLEPKT,
                          ZL5011X_DMA_RX_EMPTYBUF,
                          ZL5011X_DMA_RX_CONTIN,
                          ZL5011X_DMA_RX_WAIT_AND_EMPTYBUF

 Outputs:
    None

 Returns:
   zlStatusE

 Remarks:
    None

*******************************************************************************/
extern zlStatusE zl5011xCpuDmaSetRxMode(zl5011xParamsS *zl5011xParams,
                                zl5011xDmaRxModeE rxMode)
{
   zlStatusE status = ZL5011X_OK;
   Uint32T bits,bitMask = (ZL5011X_1BIT_MASK << ZL5011X_DMA_RX_ALL_PKT_BIT) |
                          (ZL5011X_1BIT_MASK << ZL5011X_DMA_RX_CONTINUOUS_BIT);

   ZL5011X_TRACE(ZL5011X_CPU_FN_ID,"zl5011xCpuDmaSetRxMode: mode %d",
         rxMode, 0, 0, 0, 0, 0);
   switch( rxMode)
   {
      case ZL5011X_DMA_RX_SINGLEPKT:
         bits = 0;
      break;
      case ZL5011X_DMA_RX_EMPTYBUF:
         bits = (ZL5011X_1BIT_MASK << ZL5011X_DMA_RX_ALL_PKT_BIT);
      break;
      case ZL5011X_DMA_RX_WAIT_AND_EMPTYBUF:
         bits = ZL5011X_1BIT_MASK << ZL5011X_DMA_RX_CONTINUOUS_BIT;
      break;
      case ZL5011X_DMA_RX_CONTIN:
         bits = (ZL5011X_1BIT_MASK << ZL5011X_DMA_RX_ALL_PKT_BIT) |
                (ZL5011X_1BIT_MASK << ZL5011X_DMA_RX_CONTINUOUS_BIT);
      break;
      default:
         bits = 0;
         status = ZL5011X_PARAMETER_INVALID;
      break;
   }

   if (status == ZL5011X_OK)
   {
      status = zl5011xCpuDmaStoreConstatRegister(zl5011xParams,bits,bitMask,
                                                        ZL5011X_DMA_READ_WRITE);

      if (status == ZL5011X_OK)
      {
         /* update structure */
         zl5011xParams->cpuDmaIf.rxMode= rxMode;
      }
   }

   return(status);
}

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

 Function:
    zl5011xCpuDmaSetInterruptMode

 Description:
    This function writes to the device CPU block to set the DMA Interrupt Mode
    to one of three possible options, assuming that the option is valid for the
    Rx mode selected.

 Inputs:
    zl5011xParams      Pointer to the structure for this device instance
    interruptMode     Any of: ZL5011X_DMA_NO_INTERRUPT,
                              ZL5011X_DMA_INTERRUPT_ON_PACKET,
                              ZL5011X_DMA_INTERRUPT_ON_FINISH
 Outputs:
    None

 Returns:
   zlStatusE

 Remarks:
    This function must be run AFTER zl5011xCpuDmaSetRxMode to ensure the
    interrupts are valid for the Rx mode selected

*******************************************************************************/
extern zlStatusE zl5011xCpuDmaSetInterruptMode(zl5011xParamsS *zl5011xParams,
                                       zl5011xDmaInterruptModeE interruptMode)
{
   zlStatusE status = ZL5011X_OK;
   Uint32T bits = 0, bitMask = (ZL5011X_1BIT_MASK << ZL5011X_DMA_RX_INT_ALL_PKT_BIT) |
                          (ZL5011X_1BIT_MASK << ZL5011X_DMA_RX_INT_DONE_BIT);

   ZL5011X_TRACE(ZL5011X_CPU_FN_ID,"zl5011xCpuDmaSetInterruptMode: mode %d",
         interruptMode, 0, 0, 0, 0, 0);

   switch (interruptMode)
   {
      case ZL5011X_DMA_NO_INTERRUPT: /* Supported in all Rx modes               */
         bits = 0;
         break;

      case ZL5011X_DMA_INTERRUPT_ON_PACKET:
         bits = ZL5011X_1BIT_MASK << ZL5011X_DMA_RX_INT_ALL_PKT_BIT;
         break;

      case ZL5011X_DMA_INTERRUPT_ON_FINISH:
         /* Doesn't make sense to enable interrupt of finish if DMA is set
            to continuous - as in never finish. */
         if (zl5011xParams->cpuDmaIf.rxMode == ZL5011X_DMA_RX_CONTIN)
         {
           status = ZL5011X_PARAMETER_INVALID;
         }
         else
         {
           bits = ZL5011X_1BIT_MASK << ZL5011X_DMA_RX_INT_DONE_BIT;
         }
         break;

      default:
         status = ZL5011X_PARAMETER_INVALID;
         break;
   }

   if (status == ZL5011X_OK)
   {
      status = zl5011xCpuDmaStoreConstatRegister(zl5011xParams,bits,bitMask,
                                                         ZL5011X_DMA_READ_WRITE);

      if (status == ZL5011X_OK)
      {
        zl5011xParams->cpuDmaIf.dmaInterruptMode = interruptMode;
      }
   }

   return(status);
}

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

 Function:
    zl5011xCpuDmaSetRxQueue

 Description:
    This function writes to the device CPU block to set the DMA Rx Queue ID
    Can be changed without stopping DMA.


 Inputs:
   zl5011xParams      Pointer to the structure for this device instance
   queueId           one of the 4 queues

 Outputs:
   None

 Returns:
   zlStatusE

 Remarks:
   None

*******************************************************************************/
extern zlStatusE zl5011xCpuDmaSetRxQueue(zl5011xParamsS *zl5011xParams,
                                 zl5011xQueueE queueId)
{
   zlStatusE status = ZL5011X_OK;
   Uint32T bits = queueId << ZL5011X_DMA_QUEUE_ID_LSB,
           bitMask = ZL5011X_2BIT_MASK << ZL5011X_DMA_QUEUE_ID_LSB;

   ZL5011X_TRACE(ZL5011X_CPU_FN_ID,"zl5011xCpuDmaSetRxQueue: queue ID %d",
         queueId, 0, 0, 0, 0, 0);
   status = ZL5011X_CHECK_QUEUE_NUMBER(queueId);
   if (status == ZL5011X_OK)
   {
      status = zl5011xCpuDmaStoreConstatRegister(zl5011xParams,bits,bitMask,
                                                        ZL5011X_DMA_READ_WRITE);

      if (status == ZL5011X_OK)
      {
         /* update structure */
         zl5011xParams->cpuDmaIf.dmaQueueId= queueId;
      }
   }

   return(status);
}

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

 Function:
   zl5011xCpuDmaSetRxControl

 Description:
    This function writes to the device CPU block to set the DMA Rx control mode.

 Inputs:
   zl5011xParams      Pointer to the structure for this device instance
   rxControlMode     Any of: ZL5011X_DMA_DISABLED,
                             ZL5011X_DMA_ENABLED

 Outputs:
   None

 Returns:
   zlStatusE

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美成人bangbros| 日韩和的一区二区| 国产精品久久三| 国产欧美精品国产国产专区 | 国产蜜臀av在线一区二区三区| 欧美一级日韩一级| 欧美人牲a欧美精品| 91精品国产综合久久婷婷香蕉 | 亚洲视频网在线直播| 中文字幕一区二区三区四区不卡 | 国产最新精品免费| 国产精品资源在线| 不卡电影一区二区三区| 99久久综合色| 欧美日韩国产影片| 91精品国产黑色紧身裤美女| 日韩精品最新网址| 久久精品网站免费观看| 国产精品成人一区二区三区夜夜夜| 中文字幕一区二区在线播放 | 91蜜桃婷婷狠狠久久综合9色| 91视频在线看| 在线成人av网站| 欧美成人bangbros| 国产精品黄色在线观看| 亚洲精品国产精华液| 性感美女极品91精品| 久久99精品久久久久久动态图 | 国产一区二区三区四区在线观看 | 欧美一区午夜视频在线观看| 日韩一区二区精品| 国产欧美一区二区三区鸳鸯浴| 国产精品成人免费在线| 亚洲一区二区五区| 蜜臀av性久久久久av蜜臀妖精| 国产伦精品一区二区三区免费| 北岛玲一区二区三区四区| 欧美在线视频不卡| 欧美精品一区二区不卡| 亚洲情趣在线观看| 免费高清成人在线| av激情综合网| 4438x成人网最大色成网站| 久久久久久久久久看片| 一区二区三区影院| 久久精品国产色蜜蜜麻豆| av一区二区久久| 日韩欧美不卡一区| 自拍偷拍亚洲欧美日韩| 免费av成人在线| 91丨九色丨国产丨porny| 日韩欧美色综合网站| 亚洲免费在线观看视频| 免费成人在线网站| 91国偷自产一区二区开放时间 | 国产成人亚洲综合a∨婷婷| 色综合久久综合网| 精品剧情在线观看| 亚洲激情成人在线| 国产米奇在线777精品观看| 91成人免费在线视频| 精品国产区一区| 亚洲一区二区精品视频| 成人激情电影免费在线观看| 日韩西西人体444www| 一区二区理论电影在线观看| 国产成人免费视频精品含羞草妖精| 欧美吞精做爰啪啪高潮| 中文欧美字幕免费| 久久国产日韩欧美精品| 欧美色图第一页| 亚洲欧洲色图综合| 国产精品1024| 日韩视频一区二区在线观看| 夜夜精品视频一区二区| 国产成人av福利| 精品1区2区在线观看| 污片在线观看一区二区| 91欧美一区二区| 国产农村妇女毛片精品久久麻豆| 另类调教123区| 91精品国产入口| 日韩精品亚洲专区| 欧美在线高清视频| 有坂深雪av一区二区精品| av一区二区久久| 国产精品欧美极品| 丁香婷婷综合激情五月色| 精品日韩99亚洲| 麻豆免费精品视频| 欧美大片国产精品| 免费看精品久久片| 欧美大白屁股肥臀xxxxxx| 视频一区二区中文字幕| 91麻豆精品国产91| 日日夜夜精品视频免费| 欧美日韩精品高清| 午夜伦欧美伦电影理论片| 欧美日韩国产精选| 日韩影院免费视频| 在线电影一区二区三区| 日韩av一区二区在线影视| 777久久久精品| 青娱乐精品在线视频| 91精品国产丝袜白色高跟鞋| 男人的天堂亚洲一区| 666欧美在线视频| 日本大胆欧美人术艺术动态| 欧美变态凌虐bdsm| 国产在线视频一区二区三区| 久久精品亚洲国产奇米99 | 欧美国产一区二区| 成人妖精视频yjsp地址| 亚洲欧洲精品一区二区精品久久久| 91丨九色丨蝌蚪富婆spa| 夜色激情一区二区| 在线不卡一区二区| 精品一区二区三区久久| 国产日韩欧美精品一区| 99v久久综合狠狠综合久久| 亚洲精选一二三| 欧美日韩国产成人在线免费| 青娱乐精品在线视频| 国产亚洲精品7777| 91在线精品一区二区| 亚洲一区二区黄色| 91精品久久久久久蜜臀| 精品系列免费在线观看| 亚洲国产精品成人久久综合一区| av综合在线播放| 亚洲成av人片一区二区| 欧美大黄免费观看| 91丝袜呻吟高潮美腿白嫩在线观看| 亚洲国产一区二区三区青草影视| 欧美一区二区三区色| 国产成人av在线影院| 又紧又大又爽精品一区二区| 日韩欧美国产一区二区在线播放| 国产成人自拍高清视频在线免费播放 | 国产精品麻豆一区二区| 欧美怡红院视频| 久久99精品国产麻豆不卡| 国产精品久久久久9999吃药| 精品视频999| 国产精品一品视频| 一区二区三区在线观看欧美| 日韩美女在线视频| 91在线porny国产在线看| 日韩国产一区二| 国产精品剧情在线亚洲| 欧美老女人在线| 成人黄色777网| 日韩高清在线不卡| 日韩一区在线播放| 日韩精品一区二区三区在线播放| 92精品国产成人观看免费 | 欧美一区二区在线播放| 粉嫩av一区二区三区在线播放| 一区二区三区视频在线观看| 欧美成人一区二区三区片免费| 成人丝袜高跟foot| 青青草精品视频| 亚洲综合另类小说| 国产精品久久久久aaaa| 日韩欧美一区二区在线视频| 一道本成人在线| 国产电影一区二区三区| 丝袜美腿亚洲一区二区图片| 综合婷婷亚洲小说| 精品99999| 日韩欧美国产系列| 欧美天堂亚洲电影院在线播放| 成人免费视频播放| 韩国一区二区在线观看| 亚洲成av人影院| 一区二区三区久久| 国产精品久久久久毛片软件| 精品免费视频.| 欧美精品丝袜久久久中文字幕| av亚洲精华国产精华精| 国产精品一区二区91| 久久99九九99精品| 欧美a级一区二区| 亚洲第一综合色| 亚洲激情男女视频| 亚洲免费在线观看| 亚洲欧洲日韩综合一区二区| 欧美激情在线免费观看| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 日本欧美加勒比视频| 午夜视频一区二区三区| 亚洲乱码中文字幕综合| 国产精品色噜噜| 欧美国产欧美综合| 久久综合九色综合欧美98| 日韩欧美电影一二三| 日韩精品一区二区在线观看| 日韩欧美久久久| 亚洲精品一区二区三区四区高清| 51午夜精品国产|