在"中断处理入口地址偏移量的计算函数"中的"offset = (((*p)&0xffff)+0x7E0) >> 2"本人不是很明白,"0x7E0"是怎么来的?为何最后要右移两位?EIC->IVR = 0xEA000000又是怎么来的?;各位能否作一下解释?谢谢!
{
extern u32 T0TIMI_Addr;
u32 * p = (u32 *)& T0TIMI_Addr;
u8 bCounter;
u32 offset;
EIC->ICR = 0x00000000;
EIC->IER = 0x00000000;
EIC->IPR = 0xFFFFFFFF;
EIC->FIR = 0x0000000C;
EIC->CIPR = 0x00000000;
EIC->IVR = 0xEA000000; // IVR = high half of "B offset" instruction
for (bCounter=0;bCounter<32;bCounter++)
{
offset = (((*p)&0xffff)+0x7E0) >> 2;//?
p++;
EIC->SIR[bCounter] = offset << 16;
}
EIC->SIR[]放是是中断函数的偏移地址,但为什么以& T0TIMI_Addr为首地址呢?
} |