EVT_UFX_DEVICE_REMOTE_WAKEUP_SIGNAL コールバック関数 (ufxclient.h)

関数コントローラーでリモート ウェイクアップを開始するためのクライアント ドライバーの実装。

構文

EVT_UFX_DEVICE_REMOTE_WAKEUP_SIGNAL EvtUfxDeviceRemoteWakeupSignal;

void EvtUfxDeviceRemoteWakeupSignal(
  [in] UFXDEVICE unnamedParam1
)
{...}

パラメーター

[in] unnamedParam1

クライアント ドライバーが UfxDeviceCreate メソッドの以前の呼び出しで受信した USB デバイス オブジェクトへのハンドル。

戻り値

なし

解説

関数ホスト コントローラーのクライアント ドライバーは、UfxDeviceCreate メソッドを呼び出して、そのEVT_UFX_DEVICE_REMOTE_WAKEUP_SIGNAL実装を USB 関数クラス拡張機能 (UFX) に登録します。

クライアント ドライバーは、 UfxDeviceEventComplete メソッドを呼び出すことによって、このイベントの完了を示します。

EVT_UFX_DEVICE_REMOTE_WAKEUP_SIGNAL UfxDevice_EvtDeviceRemoteWakeupSignal;

VOID
UfxDevice_EvtDeviceRemoteWakeupSignal (
 _In_ UFXDEVICE UfxDevice
 )
/*++
Routine Description:

 Signals Remote Wakeup to the Host by issuing a link state change command.
 It acquires and releases the power reference to ensure a valid power state
 before accessing the device.

Arguments:

 UfxDevice - UFXDEVICE object representing the device.

--*/
{
 NTSTATUS Status;
 PUFXDEVICE_CONTEXT DeviceContext;

 PAGED_CODE();

 TraceEntry();

 DeviceContext = UfxDeviceGetContext(UfxDevice);

 //
 // Stop Idle to ensure the device is in working state
 //

 Status = WdfDeviceStopIdle(DeviceContext->FdoWdfDevice, TRUE);
 if (!NT_SUCCESS(Status)) {
  TraceError("Failed to stop idle %!STATUS!", Status);
  goto End;
 }

 //
 // Issue a Link State Change Request.
 //

 //
 // #### TODO: Insert code to issue a link state change on the controller ####
 //

 WdfDeviceResumeIdle(DeviceContext->FdoWdfDevice);

End:
 UfxDeviceEventComplete(UfxDevice, Status);
 TraceExit();
}

要件

要件
対象プラットフォーム Windows
最小 KMDF バージョン 1.0
最小 UMDF バージョン 2.0
Header ufxclient.h
IRQL PASSIVE_LEVEL

こちらもご覧ください