📄 isr.c
字号:
/****************************************************************************
* Copyright (c) 2002 Windond Electronics Corp.
* All rights reserved.
*
* FILE NAME: isr.c
*
* DESCRIPTION: Interrupt functions of MAC Diagnostic Program for W90N740.
*
* AUTHOR: Jen-Hao Tsai, PC30
****************************************************************************/
//#include <stdio.h>
#include "board.h"
#include "uHAL\h\uhal.h"
// Interrupt Handler Table
typedef void (*fptr)(); // function pointer
fptr IRQ_HandlerTable[19];
// Setup Interrupt Handler Vector Table
void SysSetInterrupt(REG32 vector, void (*handler)())
{
IRQ_HandlerTable[vector] = handler;
}
// Interrupt Service Routine
void IRQ_IntHandler(int x)
{
unsigned int IPER, ISNR;
IPER = AIC_IPER >> 2;
ISNR = AIC_ISNR;
// uHALr_printf("ISNR=%d\n", ISNR);
if ((ISNR<=16)&&(ISNR>=13)) //MAC Interrupts
{
if (ISNR == IPER)
(*IRQ_HandlerTable[ISNR])();
}
#ifdef USE_TIME
if (ISNR == 7 || ISNR == 8)
(*IRQ_HandlerTable[ISNR])();
#endif
AIC_EOSCR = 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -