Partager via


Mapping of System Power States to Device Power States (Windows Embedded CE 6.0)

1/6/2010

You can explicitly define system power state names as registry keys in the system configuration. Mapping of system power states to device power states are enumerated as values under each power-state name key in the registry as shown in the following code example:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\State\Example]
   Default=dword:0; D0
   Flags=dword:10000; POWER_STATE_ON
   COM1:=dword1; D1

This example defines the system power state in which all devices can have a device power state up to D0, except COM1:, which is limited to D1. The Flags field is a bit mask representing the POWER_STATE_XXX settings in the Pm.h header file. OEMs can define their own power state flags.

The following table describes the possible values.

Value Description

Name

Name of the system power state.

Flags

Bit mask representing POWER_STATE_XXX values from Pm.h and/or OEM-defined power state flags. For more information on the power state flags, see POWER_BROADCAST.

Default

Default device power setting for all devices while in the system power state specified by Name. This is an integer representing the power state. Zero represents D0, 1 represents D1, and so on.

DeviceName

Any number of named devices can be included, with a system power state definition. The value associated with the device name represents the maximum device power state for that system power state.

Power Manager supports managing multiple device classes. For example, Network Driver Interface Specification (NDIS) miniports and block device drivers are assigned their own class GUIDs in Pm.h. Default values for devices of other managed classes can be specified in the registry, as well. The following example shows how this is done:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\State\Example\{98C5250D-C29A-4985-AE5F-AFE5367E5006}]
   Default=dword:1; D1
   "CISCO1"=dword:0; D0

This example configures Power Manager to restrict all NDIS miniport devices to run at or below device power state D1, except CISCO1, which can be set as high as D0.

See Also

Reference

POWER_BROADCAST

Concepts

System Power States