EVT_UFX_DEVICE_REMOTE_WAKEUP_SIGNAL callback function (ufxclient.h)

The client driver's implementation to initiate remote wake-up on the function controller.

Syntax

EVT_UFX_DEVICE_REMOTE_WAKEUP_SIGNAL EvtUfxDeviceRemoteWakeupSignal;

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

Parameters

[in] unnamedParam1

The handle to a USB device object that the client driver received in a previous call to the UfxDeviceCreate method.

Return value

None

Remarks

The client driver for the function host controller registers its EVT_UFX_DEVICE_REMOTE_WAKEUP_SIGNAL implementation with the USB function class extension (UFX) by calling the UfxDeviceCreate method.

The client driver indicates completion of this event by calling the UfxDeviceEventComplete method.

Examples

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();
}

Requirements

Requirement Value
Target Platform Windows
Minimum KMDF version 1.0
Minimum UMDF version 2.0
Header ufxclient.h
IRQL PASSIVE_LEVEL

See also