다음을 통해 공유


System Power State Setting (Windows Embedded CE 6.0)

1/6/2010

In some situations, applications may want to change the system power state. Applications are not assumed to know which power states are available on a given Windows Embedded CE-based device, nor are they expected to know the characteristics of the system power states that are available. Rather than calling the SetSystemPowerState function with an explicit state name, applications can invoke it with a bit mask describing the characteristics of the power state into which they want to transition. Power Manager translates this bit mask into a specific power state. For example, an application might request a system power status change with the POWER_STATE_SUSPEND bit set. Power Manager would then transition into suspended or SuspendCradle, depending on whether the device is in a cradle at the time of the request. If the device is removed from the cradle while in the SuspendCradle state, Power Manager would transition into suspended.

Power Manager can restrict applications from entering certain system power states. The default Power Manager implementation permits only trusted applications to suspend the system.

The following tables show predefined power state bits and their suggested interpretations.

Bit Description

POWER_STATE_ON

Highest functional level and highest power consumption.

POWER_STATE_OFF

All devices are off. Resuming from this state results in a cold boot. You can use this state to prepare a device for shipping without depleting the battery.

POWER_STATE_CRITICAL

Battery is critically low. Carry out required system maintenance, and then turn off power to devices and put DRAM into a self-refresh state. Resuming from this state results in a cold boot.

POWER_STATE_BOOT

System is in the process of booting.

POWER_STATE_IDLE

No devices are in use, and there is no user interaction. All devices should enter a low-power state, as well as a low-power system mode. You can use this as an alternative to suspending the system if the power saved from the low-power mode is satisfactory.

The sample Power Manager implementation does not use all of the states listed in this table. You can define state flags that are specific to your Windows Embedded CE-based device.

If an application requests a new power state, using SetSystemPowerState, Power Manager does the following:

  • Broadcasts a PBT_TRANSITION notification.
  • Updates the device power state, if necessary, for all drivers. If a device is already at an acceptable power state for the new system power state, Power Manager does not need to issue an IOCTL_POWER_SET.
  • If the Windows Embedded CE-based device is resuming from a suspended state, broadcasts a PBT_RESUME notification.

See Also

Reference

SetSystemPowerState
IOCTL_POWER_SET

Concepts

Application Interface

Other Resources

KernelIoControl
OEMPowerOff