WdfInterruptReportActive function (wdfinterrupt.h)
[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.
Syntax
void WdfInterruptReportActive(
[in] WDFINTERRUPT Interrupt
);
Parameters
[in] Interrupt
A handle to a framework interrupt object.
Return value
None
Remarks
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.
Examples
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;
…
}
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 8 |
Target Platform | Universal |
Minimum KMDF version | 1.11 |
Header | wdfinterrupt.h (include Wdf.h) |
Library | Wdf01000.sys (see Framework Library Versioning.) |
IRQL | <=DISPATCH_LEVEL |
DDI compliance rules | DriverCreate(kmdf) |