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

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

?? zl5011xinterrupts.c

?? Zalink50114----TDMoIP芯片驅動源碼
?? C
?? 第 1 頁 / 共 5 頁
字號:
            (void)zl5011xHostInterruptDisable();

            (void)zl5011xAdmDisableInterrupt(zl5011xParams, ZL5011X_ENABLE_INT_0_1);
            zl5011xIsrDeviceTable[index] = NULL;

            (void)zl5011xHostInterruptEnable();
            break;
         }
      }
   }

   if (status == ZL5011X_OK)
   {
      if (index >= ZL5011X_ISR_MAX_NUMBER_DEVICES)
      {
         status = ZL5011X_ERROR;

         ZL5011X_TRACE(ZL5011X_ISR_FN_ID,
               "zl5011xIsrRemoveDevice: ERROR, device not found",
               0, 0, 0, 0, 0, 0);
      }
   }

   return status;
}

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

 Function:
    zl5011xIsrHandler

 Description:
   The Isr Task checks each device and puts a message in the queue for any
   interrupts that occurred.

 Inputs:
   None

 Outputs:
   none

 Returns:
    zlStatusE

 Remarks:

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

zlStatusE zl5011xIsrHandler(void)
{
   zl5011xParamsS* zl5011xParams;
   zlStatusE status = ZL5011X_OK;
   Uint32T index= 0;
   Uint32T admIntrStatus= 0, intrBit=0;
   Uint32T loop;
   Uint32T reg;

#ifdef _DEBUG
   Uint32T tempTraceFnFilter = 0;
   Uint32T tempTraceCtxtFnFilter = 0;
   Uint32T tempTraceCtxtFilter = 0;

   if (zl5011xTraceIsrEnable == ZL5011X_FALSE)
   {
      /* disable the trace during the interrupt handler */
      tempTraceFnFilter = zl5011xTraceFnFilter;
      tempTraceCtxtFnFilter = zl5011xTraceCtxtFnFilter;
      tempTraceCtxtFilter = zl5011xTraceCtxtFilter;

      zl5011xTraceFnFilter = 0;
      zl5011xTraceCtxtFnFilter = 0;
      zl5011xTraceCtxtFilter = 0;
   }
#endif

   ZL5011X_TRACE(ZL5011X_ISR_FN_ID,
         "zl5011xIsrHandler:",
         0,0,0,0,0,0);

   for (index = 0; index <ZL5011X_ISR_MAX_NUMBER_DEVICES; index++)
   {
      zl5011xParams = zl5011xIsrDeviceTable[index];

      if( zl5011xParams != NULL)
      {
         ZL5011X_TRACE(ZL5011X_ISR_FN_ID, "zl5011xIsrHandler: %u (%08X)",
               index, (Uint32T)zl5011xParams, 0,0,0,0);

         /* read interrupt status to see if any intr bits set */
         (void)zl5011xAdmGetInterruptStatus( zl5011xParams, &admIntrStatus);

         /* mask out any interrupts that are not for this interrupt pin */
         admIntrStatus &= zl5011xParams->interruptMasks.admMasks[ZL5011X_INTERRUPT_ZERO];

         /* scan along the ADM intr word from LSB */
         for (intrBit= 1; intrBit <= ZL5011X_MAX_ADM_BIT_POSN; intrBit = intrBit << 1)
         {
            if ((intrBit & admIntrStatus) != 0)
            {
               /* send a message to the application regarding this interrupt */
               if (status ==ZL5011X_OK)
               {
                  status = zl5011xIsrCompose(zl5011xParams, intrBit);
               }
               else
               {
                  /* if failed at any point, then stop checking */
                  break;
               }
            }
         }

         /* clear interrupts in this device */
         (void)zl5011xAdmClearInterruptSource( zl5011xParams, admIntrStatus);
      }

      if (status != ZL5011X_OK)
      {
         break;
      }
   }

   /* if the interrupt has been serviced successfully, then re-enable the interrupt from
      the devices (int0) */
   if (status == ZL5011X_OK)
   {
      reg = ZL5011X_ADM_MOD_CONSTAT;

      for (loop = 0; loop < ZL5011X_ISR_MAX_NUMBER_DEVICES; loop++)
      {
         if (zl5011xIsrDeviceTable[loop] != NULL)
         {
            *(Uint32T *)(reg + zl5011xIsrDeviceTable[loop]->baseAdd) |= ZL5011X_ENABLE_INT_0;
         }
      }
   }

   if (status != ZL5011X_OK)
   {
      ZL5011X_TRACE(ZL5011X_ISR_FN_ID,
            "zl5011xIsrHandler: failed (%d)",
            status, 0, 0, 0, 0, 0);
   }

#ifdef _DEBUG
   if (zl5011xTraceIsrEnable == ZL5011X_FALSE)
   {
      /* restore the trace variables now that the interrupt has finished */
      zl5011xTraceFnFilter = tempTraceFnFilter;
      zl5011xTraceCtxtFnFilter = tempTraceCtxtFnFilter;
      zl5011xTraceCtxtFilter = tempTraceCtxtFilter;
   }
#endif

   return status;
}

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

 Function:
    zl5011xIsrQueueUpInterrupts

 Description:
     This function is called in the Isr Task, it sends messages to the DPR task
     using the message queue.
 Inputs:
   zl5011xParams      Pointer to the structure for this device instance
   pIntr             Pointer to the structure for interrupt data
 Structure Inputs:
    zl5011xParams
    interruptSource
    activeInterrupts
    context

 Outputs:

 Returns:
    zlStatusE

 Remarks:

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

static zlStatusE zl5011xIsrQueueUpInterrupts(zl5011xParamsS *zl5011xParams,
      zl5011xInterruptQueueDataS *pIntr)
{
   zlStatusE status= ZL5011X_OK;

   if (zl5011xIsrMsgQId == OS_MSG_Q_INVALID)
   {
      status = ZL5011X_NOT_RUNNING;

      ZL5011X_TRACE(ZL5011X_ISR_FN_ID, "zl5011xIsrQueueUpInterrupts: queue uninitialised",
            0, 0, 0, 0, 0, 0);
   }

   if (status == ZL5011X_OK)
   {
      pIntr->zl5011xParams = zl5011xParams;


      if (OS_MSG_Q_SEND(zl5011xIsrMsgQId, (char *)pIntr, sizeof(zl5011xInterruptQueueDataS),
            OS_NO_WAIT, 0) == OS_ERROR)
      {
          status = ZL5011X_ERROR;

          ZL5011X_TRACE(ZL5011X_ISR_FN_ID, "zl5011xIsrQueueUpInterrupts: ERROR queueing "
               "Message: block no %d intr reg 0x%.08lx, queued to DPR",
               pIntr->interruptSource, pIntr->activeInterrupts, 0,0,0,0);
      }
   }

   return status;
}

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

 Function:
    zl5011xIsrEnableInterruptSourceStructInit

 Description:
   This is the initialisation function for zl5011xIsrEnableInterruptSource

 Inputs:
   zl5011xParams      Pointer to the structure for this device instance
   par               pointer to parameter structure
 Outputs:

 Returns:
    zlStatusE

 Remarks:

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

zlStatusE zl5011xIsrEnableInterruptSourceStructInit(zl5011xParamsS *zl5011xParams,
      zl5011xIsrInterruptSourceS *par)
{
   zlStatusE status = ZL5011X_OK;

   status = ZL5011X_CHECK_POINTERS(zl5011xParams, par);

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

      par->interruptBits = 0;
      par->interruptSource = ZL5011X_NO_INTERRUPT;
      par->context = (Uint32T)ZL5011X_INVALID_CONTEXT;
      par->portNumber = (Uint8T)ZL5011X_INVALID;
   }

   return status;
}

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

 Function:
    zl5011xIsrEnableInterruptSource

 Description:
   This function is used to enable the interrupt sources used to drive the
   application interrupt (int 0 on the device).
   This does not include any of the interrupt sources that are
   controlled by the API ISR. The API interrupts are controlled when the
   relevant function is configured.

   It is intended that this would only need to be called once at initialisation,
   to indicate which problems the application is interested in.

   The interrupt enables are characterised by the block which generates them.
   This is part of the InterruptSource parameter structure, which also
   contains a 32bit register bit-pattern (usually) corresponding to the
   pattern of the enable bits in the block. In some cases these bits are in
   context memory, and for these a context number is associated with them.
   Interrupts which are associated with registers rather than contexts have the
   context number set to invalid_context. Some blocks have both types: context &
   register, in these cases the context number is used to distinguish them
   (PLA, TFQ).

   The top level mask contained in the ADM block is updated to enable the
   relevant block interrupt. Note that the CPU, MM and PKQ have interrupts
   but are not masked in the blocks themselves but in the ADM top level mask,
   therefore their interruptBits parameter uses the bit position in this ADM reg.

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

  Structure Inputs:
      interruptBits  bits set to enable the interrupt
      interruptSource   block where bits are set
      context        context (may be associated with the interrupt)
      portNumber     LAN port (may be associated with the interrupt)
   The function parameters are in a structure (see above), the various parts of
   which are used as appropriate.

 Outputs:

 Returns:
    zlStatusE

 Remarks:

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

zlStatusE zl5011xIsrEnableInterruptSource(zl5011xParamsS *zl5011xParams,
      zl5011xIsrInterruptSourceS *par)
{
   zlStatusE status = ZL5011X_OK;
   zl5011xInterruptValueE intSrc, apiSrc;
   Uint32T temp;
   Uint8T internalPortNum;

   status = ZL5011X_CHECK_POINTERS(zl5011xParams, par);

   if (status == ZL5011X_OK)
   {
      ZL5011X_TRACE(ZL5011X_ISR_FN_ID,
            "zl5011xIsrEnableInterruptSource: dev %08X, intSrc %d, ctxt %d, port %d, bits %08X",
            (Uint32T)zl5011xParams, par->interruptSource, par->context, par->portNumber, par->interruptBits, 0);
   }

   if (status == ZL5011X_OK)
   {
      /* these application interrupts can only be enabled if the interrupt is running */
      if (zl5011xIsrAppIntNum == (Uint32T)ZL5011X_INVALID)
      {
         status = ZL5011X_NOT_RUNNING;
      }
   }

   if (status == ZL5011X_OK)
   {
      /* the default interrupt to connect to is int 0. This may be overridden in some
         instances, depending on the state of the api interrupt */
      intSrc = ZL5011X_INTERRUPT_ZERO;

      if (zl5011xIsrApiIntNum != (Uint32T)ZL5011X_INVALID)
      {
         apiSrc = ZL5011X_INTERRUPT_ONE;
      }
      else
      {
         apiSrc = ZL5011X_INTERRUPT_ZERO;
      }

      switch (par->interruptSource)
      {
         case ZL5011X_GRANULE_INTERRUPT:
            status = zl5011xGmEnableInterrupts( zl5011xParams, par->interruptBits);
            break;

         case ZL5011X_WAN_CLK_INTERRUPT:
            status = zl5011xPacEnableInterrupts(zl5011xParams, par->interruptBits);
            intSrc = apiSrc;
            break;

         case ZL5011X_PACKET_RX_INTERRUPT:
            temp = par->interruptBits;

            if ((temp & (ZL5011X_1BIT_MASK << ZL5011X_PACKET_RX_PW_INT)) != 0)
            {
               zl5011xParams->interruptMasks.pkcPwInterruptEnabled = ZL5011X_TRUE;

               temp &= ~(ZL5011X_1BIT_MASK << ZL5011X_PACKET_RX_PW_INT);
            }

            status = zl5011xPkcEnableInterrupts(zl5011xParams, temp);
            break;

         case ZL5011X_MAC_IF_INTERRUPT:

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产亚洲人成网站| 日韩精品一区二区三区在线播放 | 亚洲一区二区三区国产| 亚洲国产精品视频| 成人性色生活片免费看爆迷你毛片| 欧美三级欧美一级| 国产精品色在线| 亚洲国产精品久久不卡毛片 | 国产午夜精品久久久久久免费视| 亚洲美女偷拍久久| 国产一区在线观看视频| 欧美日韩精品免费观看视频| 国产精品免费视频网站| 国产一区二区三区免费观看| 欧美欧美欧美欧美| 一区二区三区中文字幕电影| 成人动漫视频在线| 中文字幕乱码久久午夜不卡 | 午夜亚洲福利老司机| 大白屁股一区二区视频| 久久这里都是精品| 国产一区二区三区四区在线观看| 在线91免费看| 亚洲高清视频的网址| 色偷偷88欧美精品久久久| 亚洲欧洲性图库| heyzo一本久久综合| 国产午夜精品福利| 成人黄页在线观看| 亚洲欧洲日韩av| 丰满少妇在线播放bd日韩电影| 精品国产在天天线2019| 青青草国产成人av片免费| 欧美狂野另类xxxxoooo| 午夜久久久影院| 欧美日本免费一区二区三区| 日韩国产欧美在线视频| 日韩欧美激情在线| 久久国产精品72免费观看| 欧美大片拔萝卜| 国产一区二区在线观看免费| 久久久久久免费毛片精品| 国产大陆精品国产| 亚洲欧美日韩中文字幕一区二区三区 | 国产不卡一区视频| 国产喷白浆一区二区三区| 成人激情综合网站| 亚洲一区二区美女| 欧美一卡二卡在线| 国产精品一区二区黑丝| 亚洲婷婷国产精品电影人久久| 91香蕉国产在线观看软件| 一级特黄大欧美久久久| 91精品国产综合久久精品| 精品一区二区三区久久| 国产精品国产三级国产三级人妇| 色综合天天天天做夜夜夜夜做| 亚洲国产wwwccc36天堂| 2020国产精品| 一本久久a久久精品亚洲| 国产精品日韩成人| 欧美韩日一区二区三区四区| 亚洲在线视频一区| 五月激情综合婷婷| 粉嫩在线一区二区三区视频| 在线看日本不卡| 欧美一区欧美二区| 亚洲国产成人在线| 免费成人在线视频观看| 成人午夜电影久久影院| 亚洲精品一区二区在线观看| 日韩三级电影网址| 天堂在线一区二区| 久久久亚洲精品一区二区三区 | 中文字幕欧美日本乱码一线二线| fc2成人免费人成在线观看播放| 亚洲图片一区二区| 欧美国产日韩精品免费观看| 欧美日韩国产小视频| 国产精品91一区二区| 性欧美疯狂xxxxbbbb| 欧美高清在线精品一区| 555www色欧美视频| 91麻豆成人久久精品二区三区| 另类的小说在线视频另类成人小视频在线 | 日韩一级免费观看| 99国产精品国产精品久久| 国内一区二区在线| 亚洲gay无套男同| 18欧美亚洲精品| 精品成人一区二区三区| 制服丝袜激情欧洲亚洲| 成人小视频在线| 久久国产精品99久久久久久老狼| 亚洲电影在线免费观看| 最近中文字幕一区二区三区| www国产成人| 日韩三级在线免费观看| 91久久免费观看| 99久久婷婷国产综合精品| 韩国中文字幕2020精品| 免费高清在线一区| 婷婷成人激情在线网| 一区二区三区产品免费精品久久75| 国产欧美一区二区在线观看| 337p日本欧洲亚洲大胆色噜噜| 欧美一级欧美三级在线观看| 欧美亚洲日本一区| 91福利在线导航| 91久久久免费一区二区| 亚洲免费观看视频| 在线电影一区二区三区| 91精品麻豆日日躁夜夜躁| 国产成人午夜精品影院观看视频| 一区二区三区在线影院| 91精品国产色综合久久久蜜香臀| 成人一区二区视频| 日本不卡视频在线| 一区二区三区在线视频观看58 | av亚洲精华国产精华精华| 99精品久久免费看蜜臀剧情介绍| 国产激情一区二区三区桃花岛亚洲| 奇米影视一区二区三区小说| 秋霞午夜鲁丝一区二区老狼| 日本视频在线一区| 久久精品72免费观看| 久久99精品久久久| 福利电影一区二区| 99国产精品久久久久| 欧美色视频在线| 欧美一区二区在线观看| 亚洲精品一区二区三区精华液 | 高清成人在线观看| 波多野结衣精品在线| 欧美综合在线视频| 欧美肥妇bbw| 久久久久久9999| 日韩美女精品在线| 五月天国产精品| 国产一区二区三区观看| 不卡的看片网站| 精品视频全国免费看| 日韩欧美一二三| 国产欧美视频在线观看| 亚洲精品大片www| 免费的国产精品| av资源站一区| 欧美一个色资源| 久久精品一区二区三区不卡牛牛 | 91看片淫黄大片一级在线观看| 在线观看国产一区二区| 欧美电影在线免费观看| 欧美精品一区二区不卡| av影院午夜一区| 麻豆精品一区二区三区| 亚洲高清免费观看 | 国产精品欧美久久久久无广告| 亚洲免费视频成人| 另类综合日韩欧美亚洲| 色综合色综合色综合| 欧美一区二区三区视频在线| 国产精品嫩草99a| 日韩精品电影在线观看| 国产sm精品调教视频网站| 欧美激情在线一区二区三区| 亚洲色图色小说| 久久久久久一二三区| 日本 国产 欧美色综合| 97久久精品人人澡人人爽| 精品乱人伦一区二区三区| 亚洲亚洲人成综合网络| 国产91丝袜在线播放九色| 777色狠狠一区二区三区| 国产精品嫩草影院com| 国产精品 日产精品 欧美精品| 欧美探花视频资源| 香蕉成人啪国产精品视频综合网 | 久久久三级国产网站| 又紧又大又爽精品一区二区| 国产最新精品免费| 欧美三级电影在线看| 日韩一区中文字幕| 国产精品亚洲一区二区三区妖精| 欧美一区二区播放| 午夜视频一区二区三区| 日本电影欧美片| 综合亚洲深深色噜噜狠狠网站| 国产美女一区二区| 久久先锋资源网| 黄色日韩网站视频| 欧美成人激情免费网| 青青草国产成人av片免费| 91精品国产综合久久婷婷香蕉| 亚洲国产三级在线| 欧美在线视频日韩| 亚洲一区二区三区四区在线观看 | 97久久超碰国产精品| 欧美国产日本韩| 在线一区二区三区四区五区| 国产精品一级片在线观看|