|
说说以下程序的意思
void IsrIRQ( )
{
int count = 0;
unsigned int isr_pending;
unsigned int isr_mask = 0x00000001;
unsigned int isr_mask_set = rINTMSK; /* 读取中断掩码 */
ISR_ROUTINE_ENTRY isr_routine_entry = (ISR_ROUTINE_ENTRY)0x0;
isr_pending = (rINTPND & ~isr_mask_set); /* 读取中断状态 */
/* 查表 */
while(isr_mask)
{
if(isr_pending&isr_mask)
{
/* 找到中断源,获取中断例程入口地址 */
isr_routine_entry = (ISR_ROUTINE_ENTRY)(*(int*)(HandleADC+count));
break;
}
count+=4;
isr_mask <<= 1;
}
/* 调用中断服务例程 */
if(isr_routine_entry) (*isr_routine_entry)();
}
|
|