Supporting System Wake-Up in UMDF Drivers
UMDF 2 is the latest version of UMDF and supersedes UMDF 1. All new UMDF drivers should be written using UMDF 2. No new features are being added to UMDF 1 and there is limited support for UMDF 1 on newer versions of Windows 10. Universal Windows drivers must use UMDF 2.
For more info, see Getting Started with UMDF.
While the system is in a low-power state, some devices can detect an external event, such as an incoming network packet, and then wake the system. For example, if a PCI device has a system wake-up capability, as indicated in the device's Power Management Capabilities (PMC) register, it wakes the system by raising the Power Management Event (PME) signal on the PCI bus.
Call IWDFDevice2::AssignSxWakeSettings to specify:
- The low-power state that the device will enter
- Whether users can control the device's idle settings
- Whether the device's wake capability is enabled or disabled
Implement the IPowerPolicyCallbackWakeFromSx interface and the following event callback functions, if you need them for your device:
- IPowerPolicyCallbackWakeFromSx::OnArmWakeFromSx, which enable the device hardware to respond to an external wake-up event.
- IPowerPolicyCallbackWakeFromSx::OnDisarmWakeFromSx, which disables the device's ability to respond to an external wake-up event.
- IPowerPolicyCallbackWakeFromSx::OnWakeFromSxTriggered, which informs the driver that the bus detected a wake signal.
Bus drivers also participate in waking up the system. The kernel-mode driver for the device's bus does whatever is necessary on the bus adapter to enable and disable a device's ability to wake from a low-power state.
For information about registry entries that control a device's wake capabilities, see User Control of Device Idle and Wake Behavior in UMDF.