在WinCE 5.0自带的s3c2410当中的interrupthandle()当中的
sysIntr = NKCallIntChain((UCHAR)irq);
if (sysIntr == SYSINTR_CHAIN || !NKIsSysIntrValid(sysIntr))
{
// IRQ wasn't claimed, use static mapping
sysIntr = OALIntrTranslateIrq(irq);
}
这段代码的看了以后,产生了以下问题,希望各位高手帮助解答下。
1.我们常说ISR到底是指什么,仅仅指ULONG OEMInterruptHandler(ULONG ra)函数吗?
2.调用NKCallIntChain((UCHAR)irq)函数的作用是返回逻辑中断号,而sysIntr = OALIntrTranslateIrq(irq)也是返回逻辑中断号,两者功能有何不同?
在Wince5.0自带的map.c函数中明明是说这个函数起把IRQ翻译成SYSINTR的作用,怎么interrupthandle()说是// IRQ wasn't claimed, use static mapping
// Function: OALIntrTranslateIrq
//
// This function maps a IRQ to its corresponding SYSINTR.
//
UINT32 OALIntrTranslateIrq(UINT32 irq)
{
UINT32 sysIntr = SYSINTR_UNDEFINED;
OALMSG(OAL_FUNC&&OAL_VERBOSE, (L"+OALIntrTranslateIrq(%d)\r\n", irq));
if (irq >= OAL_INTR_IRQ_MAXIMUM) goto cleanUp;
sysIntr = g_oalIrq2SysIntr[irq];
cleanUp:
OALMSG(OAL_FUNC&&OAL_VERBOSE, (
L"-OEMTranslateIrq(sysIntr = %d)\r\n", sysIntr
));
return sysIntr;
}