WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS_INIT function (wdfdevice.h)

[Applies to KMDF and UMDF]

The WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS_INIT function initializes a driver's WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS structure.

Syntax

void WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS_INIT(
  [out] PWDF_DEVICE_POWER_POLICY_IDLE_SETTINGS Settings,
  [in]  WDF_POWER_POLICY_S0_IDLE_CAPABILITIES  IdleCaps
);

Parameters

[out] Settings

A pointer to a driver-allocated WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS structure.

[in] IdleCaps

A WDF_POWER_POLICY_S0_IDLE_CAPABILITIES-typed enumerator.

Return value

None

Remarks

First, the WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS_INIT function zeros the specified WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS structure and sets the structure's Size member.

Then, the function sets the structure's IdleTimeout member to IdleTimeoutDefaultValue, sets the UserControlOfIdleSettings member to IdleAllowUserControl, and sets the Enabled member to WdfUseDefault.

In addition, the function sets the PowerUpIdleDeviceOnSystemWake member to WdfUseDefault and the IdleTimeoutType member to DriverManagedIdleTimeout.

In addition, the function sets the ExcludeD3Cold member to WdfUseDefault.

Next, the function sets the structure's IdleCaps member to the value that the IdleCaps parameter specifies.

Finally, if the IdleCaps parameter specifies IdleUsbSelectiveSuspend or IdleCanWakeFromS0, the function sets the DxState member to PowerDeviceMaximum. If the IdleCaps parameter specifies IdleCannotWakeFromS0, the function sets the DxState member to PowerDeviceD3.

Examples

For a code example that uses WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS_INIT, see WdfDeviceAssignS0IdleSettings.

Requirements

Requirement Value
Target Platform Universal
Minimum KMDF version 1.0
Minimum UMDF version 2.0
Header wdfdevice.h (include Wdf.h)

See also

WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS