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

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

?? zl5011xinterrupts.c

?? Zalink50114----TDMoIP芯片驅動源碼
?? C
?? 第 1 頁 / 共 5 頁
字號:
/*******************************************************************************
*
*  File name:              zl5011xInterrupts.c
*
*  Version:                48
*
*  Author:                 PJE
*
*  Date created:           08/07/2002
*
*  Copyright 2002, 2003, 2004, 2005, Zarlink Semiconductor Limited.
*  All rights reserved.
*
*  Module Description:
*     This module is for the high level ISR functions.
*
*
*  Revision History:
*
*  Rev:  Date:       Author:  Comments:
*  1     17/07/2002  PJE      first fns.- enable/disable - ZL5011X_TESTED OK
*  2     30/07/2002  PJE      added freeze fns. and ZL5011X_TESTED(status) macro
*  3     01/08/2002  PJE      debug after progr model drwing
*  4     09/08/2002  PJE      compiles Ok but no AddDevice yet
*  5     14/08/2002  PJE      compiles Ok but no zl5011xIsrConnectApi yet
*  6     14/08/2002  PJE      debugged defines to bit positions
*  7     27/08/2002  MRC      Changed include file
*  8     28/08/2002  PJE      First clear the interrupts before enabling.
*  9     29/08/2002  PJE      more clearing the interrupts before enabling.
*  10    30/08/2002  PJE      for testing zl5011xIsrDeferredHandler
*  11    03/09/2002  PJE      zl5011xIsrTask to handle devices in any order
*  12    05/09/2002  PJE      debugging IsrTask
*  13    06/09/2002  PJE      debugging IsrInitialise and reorganising after review
*  14    26/09/2002  PJE      new zl5011xIsrNoAppnInterruptSoFar() & zl5011xIsrNoApi..
*  15    27/09/2002  PJE       debugging IsrHandler & IsrCompose
*  16    02/10/2002  PJE      new IsrApiHandler
*  17    07/10/2002  PJE      code reviewed with DJA
*  18    10/10/2002  PJE      new fns zl5011xIsrEnableApiInterrupts & Disable...
*  19    11/10/2002  PJE      Review actions
*  20    18/10/2002  PJE      Updated Cpq interrupt enable
*  21    23/10/2002  PJE      improvements to ApiHandler
*  22    24/10/2002  PJE      API tidy up & peer rev actions
*  23    31/10/2002  MRC      Added variants + minor fixes
*  24    18/11/2002  PJE      Debug & added CET ISR fns.
*  25    20/11/2002  PJE      Debug CET ISR fns.
*  26    22/11/2002  PJE      debug // comments
*  27    11/12/2002  PJE      clean-up comments
*  28    09/01/2003  MRC      Renamed fns IsrIsRunning & IsrSetCetQueueid
*  29    10/01/2003  MRC      Update
*  30    17/02/2003  MRC      Fixed typo on enable/disable fn StructInits
*  31    20/03/2003  JG       Added missing fn to api handler
*  32    03/04/2003  MRC      Moved CET to the api interrupt + other changes
*  33    10/04/2003  MRC      Changed interrupt reporting and enabling
*  34    22/05/2003  MRC      Tidied up interrupt fns
*  35    10/06/2003  DJA      Performed pre-audit actions
*  36    29/07/2003  APL      Renamed global wanLimits structure to devLimits
*  37    26/07/2004  MRC      Fixed some compiler warnings
*  38    25/08/2004  MRC      Added PW functionality
*  39    26/08/2004  MRC      Updated PW status byte support
*  40    06/09/2004  APL      Map ports correctly for different device variants
*  41    13/09/2004  APL      Renamed port mapping functions.
*  42    27/09/2004  MRC      Send message whenever the status byte changes,
*                             rather than just for L and R bit changes
*  43    24/02/2005  MRC      Moved trace statement to show interrupt bits for
*                             API handler
*  44    03/03/2005  MRC      Added notification mechanism for clock recovery flags
*  45    31/03/2005  MRC      Added support for DMA packet Rx interrupt
*  46    19/04/2005  MRC      Stopped packet Rx interrupt from being passed to
*                             the application when used for DMA processing
*  47    02/06/2005  MRC      Added support for PW polling
*  48    21/07/2005  MRC      Added PLL status to interrupt message
*
*******************************************************************************/

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

#include "zl5011xInterrupts.h"
#include "zl5011xDpr.h"
#include "zl5011xPkcMap.h"

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

/*****************   STATIC FUNCTION DECLARATIONS   ***************************/

static zlStatusE zl5011xIsrCompose(zl5011xParamsS *zl5011xParams, Uint32T admIntrBit);
static zlStatusE zl5011xIsrQueueUpInterrupts(zl5011xParamsS *zl5011xParams, zl5011xInterruptQueueDataS *par);
static zlStatusE zl5011xHandleCetIntr(zl5011xParamsS *zl5011xParams);

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

Uint32T zl5011xIsrAppIntNum = (Uint32T)ZL5011X_INVALID;
Uint32T zl5011xIsrApiIntNum = (Uint32T)ZL5011X_INVALID;

/* Message Q Ids */
OS_MSG_Q_ID zl5011xCetMsgQid = NULL;

/* Table of devices supported by the ISR */
zl5011xParamsS *zl5011xIsrDeviceTable[ZL5011X_ISR_MAX_NUMBER_DEVICES];

/* Statistics are maintained for the PW status byte and this flag is used to
   enable reporting of changes via the message queue. The application should
   access this variable using function zl5011xIsrPwReportEnable */
zl5011xBooleanE zl5011xIsrPwReportEnableFlag = ZL5011X_FALSE;

/* Or, the status changes can be fed to the clock recovery messaging system.
   The following boolean indicates whether this redirection is needed and if
   so the function to use as a callout */
zl5011xBooleanE zl5011xCetPwReportEnableFlag = ZL5011X_FALSE;
zlStatusE (*zl5011xIrqCetStatusFunc)(zl5011xParamsS *, Uint32T, Uint32T) = NULL;

/* The following variables indicate whether the DMA Rx packet interrupt is enabled
   and the function to use as a callout */
zl5011xBooleanE zl5011xIrqDmaRxFuncEnableFlag = ZL5011X_FALSE;
zlStatusE (*zl5011xIrqDmaRxFunc)(void) = NULL;

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

/*******************************************************************************
 Function:
    zl5011xIsrAddDeviceStructInit

 Description: stub function for forward compatibility.
 Inputs:
   zl5011xParams      Pointer to the structure for this device instance
   par               Pointer to structure for configuration items
 Outputs:

 Returns:
    zlStatusE

 Remarks:
*******************************************************************************/

zlStatusE zl5011xIsrAddDeviceStructInit(zl5011xParamsS *zl5011xParams,
      zl5011xIsrAddDeviceS *par)
{
   zlStatusE status = ZL5011X_OK;

   status = ZL5011X_CHECK_POINTERS(zl5011xParams, par);

   if (status == ZL5011X_OK)
   {
      ZL5011X_TRACE(ZL5011X_ISR_FN_ID,
            "zl5011xIsrAddDeviceStructInit:",
            0, 0, 0, 0, 0, 0);

      par->rtpStatsEnable = ZL5011X_TRUE;
   }

   return status;
}

/*******************************************************************************
 Function:
    zl5011xIsrAddDevice

 Description:
   Adds the device to the list of devices that are attached to the interrupt. If
   no interruptSoFar assumes this is the first device and clears the dev table.

 Inputs:
   zl5011xParams      Pointer to the structure for this device instance
   par               Pointer to function structure containing

   (accesses static variables zl5011xIsrAppIntNum & zl5011xIsrApiIntNum)

 Structure Inputs:
   rtpStatsEnable    ZL5011X_TRUE to enable interrupt processing to support RTP
                     statistics.

 Structure outputs:
   None

 Returns:
    zlStatusE

 Remarks:

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

zlStatusE zl5011xIsrAddDevice(zl5011xParamsS *zl5011xParams, zl5011xIsrAddDeviceS *par)
{
   zlStatusE status = ZL5011X_OK;
   Uint32T mask, index, freePlace = (Uint32T)ZL5011X_INVALID;

   status = ZL5011X_CHECK_POINTERS(zl5011xParams, par);

   if (status == ZL5011X_OK)
   {
      ZL5011X_TRACE(ZL5011X_ISR_FN_ID, "zl5011xIsrAddDevice:  %08X, rtpStats %d",
            (Uint32T)zl5011xParams, par->rtpStatsEnable, 0, 0, 0, 0);
   }

   if (status == ZL5011X_OK)
   {
      if ((zl5011xIsrAppIntNum == (Uint32T)ZL5011X_INVALID) && (zl5011xIsrApiIntNum == (Uint32T)ZL5011X_INVALID))
      {
         status = ZL5011X_NOT_RUNNING;
      }
   }

   /* add pointer to table */
   if (status == ZL5011X_OK)
   {
      /* find next free place  */
      for (index = 0; index < ZL5011X_ISR_MAX_NUMBER_DEVICES; index++)
      {
         if(zl5011xIsrDeviceTable[index] == zl5011xParams)
         {
            ZL5011X_TRACE(ZL5011X_ISR_FN_ID,
                  "zl5011xIsrAddDevice: device already exists",
                  0, 0, 0, 0, 0, 0);

            status = ZL5011X_MULTIPLE_INIT_ATTEMPT;
            break;
         }

         if (zl5011xIsrDeviceTable[index] == NULL)
         {
            if (freePlace == (Uint32T)ZL5011X_INVALID)
            {
               freePlace = index;
            }
         }
      }
   }

   if (status == ZL5011X_OK)
   {
      /* if got to the end of the device table without finding the device,
         then add it to the list if there is space */
      if (index == ZL5011X_ISR_MAX_NUMBER_DEVICES)
      {
         if (freePlace != (Uint32T)ZL5011X_INVALID)
         {
            /* put it here */
            zl5011xIsrDeviceTable[freePlace] = zl5011xParams;

            /* initialise the PW interrupt flag */
            zl5011xParams->interruptMasks.pkcPwInterruptEnabled = ZL5011X_FALSE;
         }
         else
         {
            /* no free place found */
            ZL5011X_TRACE(ZL5011X_ISR_FN_ID,
                  "zl5011xIsrAddDevice:  No free place found",
                  0, 0, 0, 0, 0, 0);

            status = ZL5011X_ERROR;
         }

         if (status == ZL5011X_OK)
         {
            /* if the api interrupt is active then enable the interrupt from the device */
            if (zl5011xIsrApiIntNum != (Uint32T)ZL5011X_INVALID)
            {
               mask = (ZL5011X_1BIT_MASK << ZL5011X_MAC_IF_INTERRUPT) |
                     (ZL5011X_1BIT_MASK << ZL5011X_WAN_CLK_INTERRUPT);

               if (par->rtpStatsEnable == ZL5011X_TRUE)
               {
                  status = zl5011xRtpEnableReporting(zl5011xParams);

                  mask |= ZL5011X_1BIT_MASK << ZL5011X_RTP_STATS_INTERRUPT;
               }

               /* enable RTP interrupts at the higher level as well */
               if (status == ZL5011X_OK)
               {
                  status = zl5011xAdmEnableInterruptSource(zl5011xParams, ZL5011X_INTERRUPT_ONE, mask);
               }

               if (status == ZL5011X_OK)
               {
                  status = zl5011xAdmEnableInterrupt(zl5011xParams, ZL5011X_ENABLE_INT_1);
               }
            }
         }

         if (status == ZL5011X_OK)
         {
            /* if the api interrupt is active then enable the interrupt from the device */
            if (zl5011xIsrAppIntNum != (Uint32T)ZL5011X_INVALID)
            {
               status = zl5011xAdmEnableInterrupt(zl5011xParams, ZL5011X_ENABLE_INT_0);
            }
         }
      }
   }

   return status;
}

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

 Function:
    zl5011xIsrRemoveDeviceStructInit

 Description: stub function for forward compatibility.
 Inputs:
    zl5011xParams      Pointer to the structure for this device instance
   par               Pointer to structure for configuration items
Outputs:

 Returns:
    zlStatusE

 Remarks:

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

zlStatusE zl5011xIsrRemoveDeviceStructInit(zl5011xParamsS *zl5011xParams, zl5011xIsrRemoveDeviceS *par)
{
   zlStatusE status = ZL5011X_OK;

   status = ZL5011X_CHECK_POINTERS(zl5011xParams, par);

   if (status == ZL5011X_OK)
   {
      ZL5011X_TRACE(ZL5011X_ISR_FN_ID, "zl5011xIsrRemoveDeviceStructInit:",
            0, 0, 0, 0, 0, 0);
   }

   return status;
}

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

 Function:
    zl5011xIsrRemoveDevice

 Description:
   Removes the device from the list of devices that are attached to the interrupt.

 Inputs:
   zl5011xParams      Pointer to the structure for this device instance
   par               Pointer to function structure containing

 Structure Inputs:
   None

 Structure outputs:
   None

 Returns:
    zlStatusE

 Remarks:

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

zlStatusE zl5011xIsrRemoveDevice(zl5011xParamsS *zl5011xParams, zl5011xIsrRemoveDeviceS *par)
{
   zlStatusE status = ZL5011X_OK;
   Uint32T index;

   status = ZL5011X_CHECK_POINTERS(zl5011xParams, par);

   if (status == ZL5011X_OK)
   {
      ZL5011X_TRACE(ZL5011X_ISR_FN_ID,
            "zl5011xIsrRemoveDevice: device %08X",
            (Uint32T)zl5011xParams, 0, 0, 0, 0, 0);
   }

   /* find pointer in table */
   if (status == ZL5011X_OK)
   {
      for( index= 0; index < ZL5011X_ISR_MAX_NUMBER_DEVICES; index++)
      {
         if (zl5011xIsrDeviceTable[index] == zl5011xParams)
         {
            /* turn off interrupts while removing the device from the table */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
911精品产国品一二三产区| 夜夜揉揉日日人人青青一国产精品| 久久久精品综合| 偷拍一区二区三区四区| 成人aa视频在线观看| 日韩一区二区三区精品视频| 亚洲男人电影天堂| 国产成人午夜精品5599 | 成人高清视频免费观看| 日韩一区二区电影在线| 亚洲精品国产a久久久久久| 国产69精品久久99不卡| 久久综合久久综合久久综合| 午夜影院在线观看欧美| 欧美午夜影院一区| 亚洲精品一二三| 97精品国产露脸对白| 日本一区二区三区四区| 国产精品资源在线看| 精品国产乱码久久久久久蜜臀 | 亚洲精品美国一| 99久久精品国产毛片| 国产精品天干天干在观线| 国内精品伊人久久久久av一坑 | 91精品国产入口| 性做久久久久久久久| 欧美性受xxxx| 亚洲h精品动漫在线观看| 在线精品视频一区二区| 亚洲精品免费播放| 欧美午夜精品久久久久久超碰| 亚洲日本欧美天堂| 色婷婷亚洲一区二区三区| 亚洲色图视频网站| 欧美午夜在线观看| 日韩主播视频在线| 欧美草草影院在线视频| 国产在线视频一区二区三区| 国产香蕉久久精品综合网| 丁香婷婷综合五月| 亚洲天堂2014| 精品视频免费看| 美女一区二区久久| 久久久久国色av免费看影院| 成人国产精品免费观看| 亚洲自拍偷拍麻豆| 欧美高清hd18日本| 国产精品夜夜嗨| 亚洲色图.com| 欧美片网站yy| 久久99久久久欧美国产| 中文文精品字幕一区二区| 99久久免费视频.com| 亚洲尤物视频在线| 日韩女优电影在线观看| 成人午夜激情在线| 午夜精品影院在线观看| 久久天堂av综合合色蜜桃网| 成人黄色国产精品网站大全在线免费观看 | 69堂成人精品免费视频| 国产精品一品二品| 亚洲h精品动漫在线观看| wwwwxxxxx欧美| 一本久久精品一区二区| 蜜臀国产一区二区三区在线播放 | av影院午夜一区| 婷婷中文字幕一区三区| 久久精品欧美一区二区三区麻豆| 99国内精品久久| 日本欧美久久久久免费播放网| 亚洲国产成人一区二区三区| 4438x亚洲最大成人网| 成人动漫一区二区三区| 肉肉av福利一精品导航| 国产精品久久一级| 91.xcao| 欧洲一区二区三区免费视频| 国产原创一区二区| 日韩在线a电影| 尤物在线观看一区| 国产亚洲欧洲997久久综合| 欧美日韩激情一区二区三区| 成人三级伦理片| 韩国v欧美v日本v亚洲v| 午夜一区二区三区视频| 亚洲色图都市小说| 国产欧美一二三区| 精品少妇一区二区三区免费观看 | 国产99久久久国产精品潘金网站| 水野朝阳av一区二区三区| 亚洲日本一区二区| 欧美国产视频在线| 国产网站一区二区| 日韩免费视频线观看| 欧美日韩日日骚| 91婷婷韩国欧美一区二区| 国产成人免费视频网站高清观看视频| 青青草成人在线观看| 亚洲成人免费视| 一区二区在线看| 1024成人网色www| 成人欧美一区二区三区视频网页| 久久伊人中文字幕| 精品国产一区二区精华| 日韩三级免费观看| 日韩精品一区二区三区视频播放 | 精品国产乱码久久久久久浪潮| 在线电影一区二区三区| 欧美日韩一卡二卡三卡| 91福利在线导航| 欧美在线免费播放| 欧洲精品一区二区三区在线观看| 99久久伊人久久99| 福利一区在线观看| av电影在线观看完整版一区二区| 成人少妇影院yyyy| 成人app软件下载大全免费| 99久久综合国产精品| 播五月开心婷婷综合| av不卡免费电影| 欧美在线短视频| 欧美精品1区2区| 国产大陆精品国产| 亚洲一区二区三区在线看| 国产亚洲精品免费| 欧美精品一二三四| 欧美精品一卡两卡| 欧美大黄免费观看| 久久欧美一区二区| 国产精品久久久久久久久免费樱桃| 中文字幕一区在线| 亚洲福中文字幕伊人影院| 秋霞电影一区二区| 国产乱理伦片在线观看夜一区| 国产.精品.日韩.另类.中文.在线.播放 | 精品一区二区在线免费观看| 国产老肥熟一区二区三区| 国产91丝袜在线观看| 91婷婷韩国欧美一区二区| 欧美视频日韩视频| 精品国产一区二区在线观看| 中文字幕日韩av资源站| 亚洲国产日韩a在线播放| 国产一区二区美女| 色噜噜久久综合| 欧美一级片在线观看| 国产精品欧美一区喷水| 亚洲一区在线看| 国产在线国偷精品产拍免费yy| 成人国产免费视频| 日韩一区二区三区视频在线| 中文字幕不卡在线| 日韩av一级片| 91日韩在线专区| 欧美草草影院在线视频| 亚洲黄色在线视频| 国产一区二区在线观看免费| 在线观看亚洲精品| 日本一区二区三区四区| 婷婷开心久久网| 99久久婷婷国产精品综合| 亚洲精品在线观看视频| 亚洲国产中文字幕在线视频综合 | 国产亚洲一区二区在线观看| 亚洲最色的网站| 国产精品白丝av| 91精品国产欧美一区二区18| 亚洲欧美区自拍先锋| 国产一区 二区| 911国产精品| 亚洲狠狠爱一区二区三区| 成人激情电影免费在线观看| 欧美大肚乱孕交hd孕妇| 亚洲成av人片观看| 91丝袜国产在线播放| 久久久99久久| 经典三级在线一区| 91精品一区二区三区久久久久久 | 91蜜桃免费观看视频| 欧美精品一区二区三区高清aⅴ| 午夜精品久久久久久久蜜桃app| 成人aaaa免费全部观看| 国产偷v国产偷v亚洲高清| 免费成人你懂的| 欧美精选在线播放| 亚洲综合成人在线| 欧洲人成人精品| 亚洲欧美激情小说另类| 99国产精品视频免费观看| 国产婷婷色一区二区三区在线| 国内外成人在线| 久久综合久色欧美综合狠狠| 久草在线在线精品观看| 日韩精品中文字幕在线一区| 日韩激情在线观看| 正在播放亚洲一区| 日本欧美一区二区三区乱码| 日韩一区二区视频| 日本在线不卡视频| 樱花影视一区二区|