Partager via


Power Management Wake Sources (Windows CE 5.0)

Send Feedback

The Power Manager wake sources are affected by the IOCTL_HAL_ENABLE_WAKE, IOCTL_HAL_DISABLE_WAKE, and IOCTL_HAL_GET_WAKE_SOURCEKernelIoControl codes. Each of these control codes receives a wake source identifier as an input or output parameter.

A typical device interrupt can serve as a wake source and the device's corresponding SysIntr value acts as the wake source identifier. SysIntr values are never greater than the SYSINTR_MAXIMUM value, but values up to SYSWAKE_BASE – 1 are reserved for this group.

The IOCTL_HAL_ENABLE_WAKE and IOCTL_HAL_DISABLE_WAKE I/O control calls enable and disable a wake source, respectively. These calls inform the kernel to program the Power Management Unit to enable the wake source corresponding to the identifier.

The IOCTL_HAL_GET_WAKE_SOURCE I/O control returns the identifier of the wake source that awakened the system from its most recent suspend. If the wake source is unknown or the system has never suspended, it returns a value of SYSWAKE_UNKNOWN. The kernel should map the wake source to the most appropriate identifier that was enabled at the time of suspend. For example, if the kernel supports both the Windows CE-based device-specific identifier SYSWAKE_COM1_RING_INDICATE and the MS-defined generic identifier SYSWAKE_RING_INDICATE but only SYSWAKE_COM1_RING_INDICATE was enabled when the system suspended. In this case, the I/O control would return SYSWAKE_COM1_RING_INDICATE. If only SYSWAKE_RING_INDICATE was enabled, that identifier would be returned. If both identifiers were enabled but COM1 woke the system, the kernel would return SYSWAKE_COM1_RING_INDICATE. If another port awakened the system, it would return SYSWAKE_RING_INDICATE. The IOCTL_HAL_GET_WAKE_SOURCE return value is constant between system suspends.

You can edit the source code to program knowledge into the Power Manager . The Power Manager can also associate wake sources with activity timers, in which case it will treat wake events as device activity for the purpose of determining the system power state that should be entered on resume from the suspend.

See Also

Kernel Power Management

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.