我在x86下有块isa板子,用来产生一个10号硬件中断,在vxwork下怎么响应不了,总是进不了中断服务程序。请各位大虾帮忙看看程序是否有问题???我本来的设想是,每响应一次中断,nCounter就计数加1,到运行时始终为0。。。。。。
#define interrupt_level 72 /*irq 10*/
int nCouter=0;
void User_ISR(void)
{
logMsg("acknowledging interrupt\n",0,0,0,0,0,0);
nCouter = nCouter+1;
sysOutByte(0xa0,0x20);
sysOutByte(0x20,0x20);
}
void testInt(void)
{
int i=0;
sysOutByte(0x21,sysInByte(0x21) & ~(1<<2));
sysOutByte(0xa1,sysInByte(0xa1) & ~(1<<2));
if(intConnect((VOIDFUNCPTR *) INUM_TO_IVEC(interrupt_level),User_ISR,0)==ERROR)
logMsg("intConnect error! \n",0,0,0,0,0,0);
for(i=0;i++;i<10)
{
printf("nCounter = %d " ,nCouter);
}
}