PowerState.Sleep Method

Puts the device into a sleep state that is only awoken by the specified events.

Namespace: Microsoft.SPOT.Hardware
Assembly: Microsoft.SPOT.Hardware (in microsoft.spot.hardware.dll)

Syntax

public static void Sleep (
         SleepLevel level,
         HardwareEvent wakeUpEvents
)

Parameters

  • level
    The level of sleep the system should enter. The behavior of the level is determined by the hardware vendor.
  • wakeUpEvents
    The events that will cause the system to exit the specified sleep level.

Remarks

This method puts the device into a sleep state that is only awoken by the events described in wakeUpEvents. If the event HardwareEvent.SystemTimer is not used, the system will not be woken up by any managed timers, and other threads will not be executed until this sleep call exits.

This method raises the OnSleepChange event.

The MaximumTimeToActive property contains the timeout value for this call.

Version Information

Available in the .NET Micro Framework versions 4.0, 4.1, and 4.2.

See Also

Reference

PowerState Class
PowerState Members
Microsoft.SPOT.Hardware Namespace