代碼:
ULONG vector;
KIRQL irql;
KAFFINITY affinity;
vector = HalGetInterruptVector(ACPIBus,
0,
10, //外部硬體中斷,中斷號10.
10, //外部硬體中斷,中斷號10.
&irql,
&affinity
);
vector = vector & 0xFF;
KdPrint(("HalGetInterruptVector vector - %X irql - %X affinity - %X\n", vector, irql, affinity));
status = IoConnectInterrupt(&pDevExt->InterruptObject, (PKSERVICE_ROUTINE)OnInterrupt,
(PVOID)pDevExt, NULL, vector, irql, irql, LevelSensitive, FALSE, affinity, FALSE);
功能:將外部中斷IRQ10與中斷函式OnInterrupt掛鉤,中斷10觸發時進入OnInterrupt函式進行埠的處理操作。
問題:IoConnectInterrupt函式執行不成功,回傳錯誤。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/239784.html
標籤:驅動開發/核心開發
