?? irq.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 + -