Device Power States (Compact 7)
3/12/2014
Device power states define the power consumption levels for peripheral devices in the system. Windows Embedded Compact 7 predefines five device power states; these states are listed in the following table. During system power state transitions, Power Manager sets the device power state of each power-managed device in the system according to how you map system power states to device power states in the registry. A device can have a device power state that is different from those of other devices. The device driver managing a device normally does not determine the device power state for that device; instead, it sets the device power state based on an I/O control (IOCTL) command that it receives from Power Manager. Power Manager can recommend a particular set of device states to a device driver, and the device driver can select a device state from this subset. When Power Manager passes a device power state to a device driver, that device driver is responsible for mapping the state to its device capabilities and then performing the applicable state transition on the device hardware. If the device power state for a device remains the same after a system power state transition, Power Manager does not issue an IOCTL command to that device to change device power state.
Windows Embedded Compact 7 supports the following device power states:
Device Power States
Name | State | Description |
---|---|---|
Full On |
D0 |
The device is on and running, receiving full power from the system and delivering full functionality to the user. |
Low On |
D1 |
The device is fully functional, although at a lower power or performance state than D0. The D1 state is applicable for when the device is in use, but only when peak performance is unnecessary and power is at a premium. |
Standby |
D2 |
The device is in a partial power consumption mode and is standing by for a wakeup request from the OS. |
Sleep |
D3 |
The device is using the minimum power level that is required for supporting device-initiated wakeup. |
Off |
D4 |
The device has no power. |
Some devices can dynamically raise and lower their device power states according to how often a device is used. The actual algorithm for this self-management of power is device-specific. The Power Manager DevicePowerNotify function provides a means for device drivers to request that Power Manager adjust the power state of a device. Power Manager allows power to be adjusted if the requested device power state falls between the maximum value (mandated by the system power state) and the minimum value (determined by application calls to SetPowerRequirement). When Power Manager accepts the requested power state adjustment, it updates the power state of the device, typically using the IOCTL_POWER_SET command. Some device drivers automatically change their device power state without calling DevicePowerNotify; instead, these device drivers automatically change to a device power state that falls within the minimum and maximum device power states set by Power Manager. For example, a device that detects user activity may fall into a low power state after a period of no activity and later restore the device to a higher power state when activity resumes. This device driver makes each of these device state transitions without notifying Power Manager.
Some devices can support more levels of power than those represented by the D0 through D4 device power states. If you have a device that fits this description, you can map multiple power levels supported by the device into each of the device power states understood by Power Manager. Your device can self-manage power within each custom device power state group independently of Power Manager. However, your device driver must call DevicePowerNotify to transition between your custom device power state groups.
For more information about device drivers and power management, see Implementing Your Device Driver.