亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
精品理论电影在线| 午夜视频在线观看一区二区| 亚洲桃色在线一区| 欧美aaaaaa午夜精品| 99精品国产91久久久久久| 欧美一级电影网站| 亚洲美女视频在线| 粉嫩av一区二区三区在线播放| 欧美亚洲精品一区| 国产精品国产a级| 韩国理伦片一区二区三区在线播放| 91高清视频在线| 国产精品久久久久久久久晋中| 久久国产精品无码网站| 欧美日韩视频在线一区二区| 亚洲精品视频免费看| 成人一区二区三区中文字幕| 日韩一级视频免费观看在线| 亚洲狠狠爱一区二区三区| av不卡一区二区三区| 国产精品美女视频| 国产精品18久久久久| 精品国产不卡一区二区三区| 日韩一区精品视频| 欧美日本在线观看| 午夜欧美视频在线观看| 欧美三级三级三级爽爽爽| 一区二区三区高清| 色www精品视频在线观看| 一区在线中文字幕| 91美女视频网站| 亚洲人成网站影音先锋播放| 不卡视频一二三四| 亚洲视频电影在线| 91久久精品一区二区三| 一区二区三区精密机械公司| 欧美亚洲综合一区| 亚洲国产综合在线| 欧美剧在线免费观看网站| 五月激情综合婷婷| 欧美成人乱码一区二区三区| 国内精品国产三级国产a久久 | 国产福利精品一区二区| wwww国产精品欧美| 成人午夜看片网址| 自拍偷自拍亚洲精品播放| 91久久精品午夜一区二区| 亚洲大片免费看| 日韩免费看的电影| 国产精品资源在线看| 国产精品久久久久9999吃药| 91免费视频观看| 午夜精品免费在线观看| 欧美成人乱码一区二区三区| 国产成a人亚洲| 亚洲青青青在线视频| 欧美久久高跟鞋激| 国产乱人伦偷精品视频不卡| 中文字幕成人在线观看| 欧美午夜精品免费| 国产一区二区三区四| 亚洲视频在线一区| 欧美xingq一区二区| eeuss鲁一区二区三区| 亚洲成人一二三| 国产日韩欧美在线一区| 色婷婷久久99综合精品jk白丝| 日日嗨av一区二区三区四区| 欧美经典三级视频一区二区三区| 欧美视频一区二| 国产精品亚洲综合一区在线观看| 丝袜美腿亚洲一区二区图片| 国产片一区二区| 欧美精品久久99久久在免费线 | 久久亚洲私人国产精品va媚药| 不卡高清视频专区| 久色婷婷小香蕉久久| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| 欧美日韩亚洲综合一区二区三区| 国产麻豆日韩欧美久久| 性做久久久久久久久| 国产精品国产自产拍高清av| 日韩一区二区在线看| 色婷婷综合视频在线观看| 韩日av一区二区| 午夜精品久久久久久久久久| 国产精品久久久久精k8| 久久婷婷综合激情| 欧美一卡二卡在线观看| 色香蕉久久蜜桃| 成人国产精品免费观看动漫| 蜜桃视频第一区免费观看| 一区二区三区丝袜| 国产精品护士白丝一区av| 久久先锋影音av鲁色资源| 欧美男男青年gay1069videost| 成人动漫中文字幕| 国产乱淫av一区二区三区| 精品亚洲aⅴ乱码一区二区三区| 亚洲国产日韩av| 亚洲黄色av一区| 亚洲欧美激情一区二区| 国产精品色一区二区三区| 久久精品一区八戒影视| 欧美精品一区二区在线播放 | 日本va欧美va瓶| 亚洲韩国一区二区三区| 亚洲永久免费av| 洋洋av久久久久久久一区| 亚洲欧美aⅴ...| 亚洲女人****多毛耸耸8| 亚洲欧美自拍偷拍色图| 国产精品免费人成网站| 国产欧美一区二区精品仙草咪| 欧美精品一区二区久久婷婷| 精品国产a毛片| 久久色在线观看| 国产亚洲精品aa午夜观看| 337p粉嫩大胆色噜噜噜噜亚洲| 精品少妇一区二区三区日产乱码| 欧美一区二区三区在线电影| 欧美va亚洲va| 国产欧美精品日韩区二区麻豆天美| 久久嫩草精品久久久久| 国产色91在线| 国产精品大尺度| 蜜臀99久久精品久久久久久软件| 视频一区二区不卡| 久久99精品一区二区三区三区| 狠狠色丁香久久婷婷综合丁香| 精品一区二区三区日韩| 国产成人午夜精品5599 | 狠狠色综合播放一区二区| 国产精品小仙女| 99国产精品久久久久久久久久| 一本一道久久a久久精品综合蜜臀| 在线中文字幕不卡| 欧美一区二区三区影视| 国产欧美日韩在线| 亚洲综合色成人| 免费欧美高清视频| 成人晚上爱看视频| 欧美久久婷婷综合色| 久久精品人人做| 亚洲图片欧美视频| 国产黄色精品网站| 欧美在线影院一区二区| 欧美tickle裸体挠脚心vk| 国产精品国产三级国产有无不卡| 亚洲6080在线| 成人免费视频播放| 在线综合视频播放| 国产精品网站一区| 日韩精品成人一区二区三区| 成人网在线免费视频| 欧美一区二区三区在线视频| 国产精品美女久久久久av爽李琼| 午夜精品久久久久久不卡8050| 国产成人一级电影| 日韩一区二区三区免费看 | 欧美日韩一区精品| 国产亚洲短视频| 三级久久三级久久久| 99精品视频在线播放观看| 91精品国产欧美日韩| 亚洲美女淫视频| 成人激情电影免费在线观看| 欧美一区二区三区免费在线看 | 日韩精品国产欧美| 99麻豆久久久国产精品免费优播| 4hu四虎永久在线影院成人| 免费美女久久99| 色综合天天综合| 国产亚洲精品7777| 极品美女销魂一区二区三区| 欧美日韩在线播放三区| 亚洲欧美在线高清| 国产激情视频一区二区在线观看| 欧美久久久久久久久久| 一区二区三区日韩精品视频| 成人免费观看男女羞羞视频| 欧美大黄免费观看| 三级影片在线观看欧美日韩一区二区| 懂色av一区二区三区蜜臀| 精品国产a毛片| 精品无人码麻豆乱码1区2区| 欧美丰满美乳xxx高潮www| 一区二区三区在线观看国产 | 欧美色手机在线观看| 国产精品传媒在线| 成人精品国产福利| 亚洲国产精品av| 国产v综合v亚洲欧| 国产精品网站在线| a在线欧美一区| 中文字幕一区三区| 91日韩精品一区| 一区二区三区91| 欧美午夜影院一区| 日本亚洲一区二区|