阅读:1335回复:3
中断共享问题--急
请问高手:
我在中断共享的时候,为什么不行,请帮我分析: HANDLE g_IsrHandle = LoadIntChainHandler( g_szIsrDll, g_szIsrHandler, (BYTE)Irql ); GIISR_INFO Info; Info.SysIntr = 0X21 ; Info.CheckPort = TRUE; Info.PortIsIO = FALSE; Info.UseMaskReg = FALSE; Info.PortAddr = (DWORD)g_pPhysicalAddress + 0x0A2; Info.PortSize = sizeof(WORD); Info.Mask = 0x00F7; if (!KernelLibIoControl(g_IsrHandle, IOCTL_GIISR_INFO, &Info, sizeof(Info), NULL, 0, NULL)) pService->Interrupt_ID = Info.SysIntr; InterruptDisable(pService->Interrupt_ID); pService->Event = CreateEvent(NULL, FALSE, FALSE, NULL); if(!InterruptInitialize(pService->Interrupt_ID, pService->Event, NULL, 0)) { OutputDebugString ( TEXT("InterruptInitialize failed\n") ); return FALSE; } 在ulRet = NKCallIntChain(ucCurrentInterrupt)无论我设置IRQ为何值返回都是SYSINTR_CHAIN,这说明中断共享不成功。请高手指点! |
|
论坛版主
|
沙发#
发布于:2005-08-01 17:09
你的mask是要检测哪位?写反了吧
|
|
板凳#
发布于:2005-08-02 15:00
我这么用都不行
Info.PortAddr = (DWORD)g_pPhysicalAddress + 0x0A2; Info.UseMaskReg =TRUE; Info.MaskAddr = (DWORD)g_pPhysicalAddress + 0x0A2; 请问这是为什么,按道理来说这样是至少会有所响应吧,但是就是没有,请问版主我应该怎么调试? |
|
论坛版主
|
地板#
发布于:2005-08-02 15:54
Info.UseMaskReg = FALSE;
然后 Info.Mask = ~0x00F7;(这个才是关键三)你是不是要检查第一位? |
|