// wdfinterrupt.h
VOID WdfInterruptReportActive(
[in] WDFINTERRUPT Interrupt
);
View the official Windows Driver Kit DDI referenceNo description available.
[Applies to KMDF only]
The WdfInterruptReportActive informs the system that the interrupt is active and the driver is ready to process interrupt requests on the associated lines.
Interrupt [in]A handle to a framework interrupt object.
Only drivers that implement functional state power management call WdfInterruptReportActive.
A driver does not need to call WdfInterruptReportActive immediately after creating an interrupt. The driver should only call WdfInterruptReportActive after having previously called WdfInterruptReportInactive.
Typically, a driver calls WdfInterruptReportActive from either its ComponentActiveConditionCallback routine, or from ComponentIdleStateCallback when State is 0 (indicating the fully on F0 state).
If your driver calls this method on an operating system earlier than Windows 8, the framework's verifier reports an error.
For more information, see Supporting Functional Power States.
The following example shows how a driver might call WdfInterruptReportActive from the ComponentIdleStateCallback routine of a KMDF driver. The driver registers a single component by calling WdfDeviceWdmAssignPowerFrameworkSettings.
VOID
MyComponentIdleStateCallback(
_In_ PVOID Context,
_In_ ULONG Component,
_In_ ULONG State
)
{
PFDO_DEVICE_DATA deviceData;
PINTERRUPT_CONTEXT interruptContext;
deviceData = FdoGetData((WDFDEVICE)Context);
interruptContext = InterruptGetData(deviceData->Interrupt);
switch (State) {
case 0:
if (interruptContext->ReportedInactive) {
//
// the interrupt was reported inactive earlier. We need to report active now.
//
WdfInterruptReportActive(deviceData->Interrupt);
interruptContext->ReportedInactive = FALSE;
//
// Enable interrupt generation at hardware.
//
WdfInterruptAcquireLock(deviceData->Interrupt);
EnableInterruptInHardware();
WdfInterruptReleaseLock(deviceData->Interrupt);
}
break;
…
}