⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 irq.c

📁 T-Kernel下PCF8563的驱动程序开发
💻 C
字号:
/**********************************************************************************/
/*                                                                                */
/*    Copyright (C) 2002 Oki Electric Industry Co., LTD.                          */
/*                                                                                */
/*    System Name    :  uPLAT series                                              */
/*    Module Name    :  IRQ module                                                */
/*    File   Name    :  irq.c                                                     */
/*    Revision       :  01.00                                                     */
/*    Date           :  2002/12/02 initial version                                */
/*                                                                                */
/**********************************************************************************/
#include "ML674001.h"
#include "common.h"
#include "irq.h"

/****************************************************************************/
/*  Table of IRQ handler                                                    */
/*      If interrupt of interrupt number N occurred,                        */
/*      function of IRQ_HANDLER_TABLE[N] is called.                         */
/****************************************************************************/
pIRQ_HANDLER IRQ_HANDLER_TABLE[IRQSIZE];

/****************************************************************************/
/*  Not defined interrupt                                                   */
/*  Function : null_handler                                                 */
/*      Parameters                                                          */
/*          Input   :   Nothing                                             */
/*          Output  :   Nothing                                             */
/****************************************************************************/
void null_handler(void)
{
    return;
}

/****************************************************************************/
/*  Initialize interrupt control registers (IRQ interrupt)                  */
/*  Function : init_irq                                                     */
/*      Parameters                                                          */
/*          Input   :   Nothing                                             */
/*          Output  :   Nothing                                             */
/****************************************************************************/
void init_irq(void)
{
    int i;

    /* initialize IRQ registers */
    put_wvalue(ILC0, 0x0);  /* all interrupt level is set as 0 */
    put_wvalue(ILC1, 0x0);  /* all interrupt level is set as 0 */
    put_wvalue(ILC, 0x0);   /* all interrupt level is set as 0 */
    put_wvalue(IRQS, 0x0);  /* soft interrupt is canceled */
    put_wvalue(CIL, 0x0FE); /* CIL register is cleared
                               (write '1' in CIL[n](1<=n<=7)) */

    /* initialize IRQ handler table */
    for(i=0; i<IRQSIZE; i++){
        IRQ_HANDLER_TABLE[i] = null_handler;    /* no interrupt handler is
                                                   defined yet */
    }
    
    return;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -