|
为什么调用InterruptInitialize总是失败
[复制链接]
我现在做can总线的驱动,在中断部分调用InterruptInitialize总是失败,下面是我的代码
hEvent=CreateEvent(0,FALSE,FALSE,NULL);
if(hEvent)
{
RETAILMSG(1,(TEXT("CAN:CreateEvent_okaaaaaaaaaaaaaaaaaaaa")));
}
hCanThread=CreateThread(NULL,
0,
CanIST,
NULL,
CREATE_SUSPENDED,
&dwThreadID);
if(hCanThread)
{
RETAILMSG(1,(TEXT("CANTHREAT:CREATETHREAD_OKhhhhhhhhhhhhhhhhhhhhhhhhhh\n")));
}
else
{
RETAILMSG(1,(TEXT("CANTHREAT:CREATETHREAD_FALSEhhhhhhhhhhhhhhhhhhhhhhhhhh\n")));
return 0;
}
dwISTPriority=253;
if(!CeSetThreadPriority(hCanThread,dwISTPriority))
{
RETAILMSG(1,(TEXT("CeSetThreadPriority Failed!!hhhhhhhhhhhhhhhhhhhhhhhhhh\n")));
}
if(!InterruptInitialize(SYSINTR_CAN,hEvent,NULL,0))
{
RETAILMSG(1,(TEXT("InterruptInitialize Failed!!hhhhhhhhhhhhhhhhhhhhhhhhhh\n")));
}
ResumeThread(hCanThread);
前面的几步都没有问题,就是在连接系统中断号和事件的时候失败?
我的其他中断的设置都做了,驱动编译没有问题
请大家帮忙
|
|