WdfInterruptReportInactive 関数 (wdfinterrupt.h)
[KMDF にのみ適用]
WdfInterruptReportInactive メソッドは、割り込みがアクティブでなくなり、ドライバーが関連付けられている行で割り込み要求を予期しないことをシステムに通知します。
構文
void WdfInterruptReportInactive(
[in] WDFINTERRUPT Interrupt
);
パラメーター
[in] Interrupt
フレームワーク割り込みオブジェクトへのハンドル。
戻り値
なし
注釈
WdfInterruptReportInactive 機能状態電源管理を実装するドライバーのみが呼び出されます。
ドライバーが WdfInterruptReportInactive 呼び出すと、電源管理フレームワーク (PoFx) は、関連する電源管理タスクを実行できます。
通常、ドライバーは、ComponentIdleConditionCallback ルーチンから、または ComponentIdleStateCallback から WdfInterruptReportInactive が 0 より大きい場合 (低電力 Fx 状態を示します) を呼び出します。
ドライバーが Windows 8 より前のオペレーティング システムでこのメソッドを呼び出す場合は、フレームワークの検証ツールを エラーが報告されます。
例示
次の例は、ドライバーが KMDF ドライバー ComponentIdleStateCallback ルーチンから WdfInterruptReportInactive を呼び出す方法を示しています。 ドライバーは、WdfDeviceWdmAssignPowerFrameworkSettingsを呼び出すことによって、1 つのコンポーネントを登録します。
VOID
MyComponentIdleStateCallback(
_In_ PVOID Context,
_In_ ULONG Component,
_In_ ULONG State
)
{
PFDO_DEVICE_DATA deviceData;
PFDO_INTERRUPT_CONTEXT interruptContext;
deviceData = FdoGetData((WDFDEVICE)Context);
interruptContext = InterruptGetData(deviceData->Interrupt);
switch (State) {
case 0:
…
break;
//
// PoFx may make us go to any of the F-states directly, hence we execute
// F0Exit code for all of the Fx states. Note that transition to any Fx
// state happens from F0 (and not another Fx state).
//
default:
//
// Disable interrupt generation at hardware if needed.
//
WdfInterruptAcquireLock(deviceData->Interrupt);
DisableInterruptInHardware();
WdfInterruptReleaseLock(deviceData->Interrupt);
//
// Report that interrupt is now inactive.
//
WdfInterruptReportInactive(deviceData->Interrupt);
interruptContext->ReportedInactive = TRUE;
break;
…
}
必要条件
要件 | 価値 |
---|---|
サポートされる最小クライアント | Windows 8 |
ターゲット プラットフォーム の | 普遍 |
最小 KMDF バージョン | 1.11 |
ヘッダー | wdfinterrupt.h (Wdf.h を含む) |
図書館 | Wdf01000.sys (フレームワーク ライブラリのバージョン管理を参照)。 |
IRQL | <=DISPATCH_LEVEL |
DDI コンプライアンス規則 を する | DriverCreate(kmdf) |