Share via


Sleep Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

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

'Declaration
Public Shared Sub Sleep ( _
    level As SleepLevel, _
    wakeUpEvents As HardwareEvent _
)
public static void Sleep(
    SleepLevel level,
    HardwareEvent wakeUpEvents
)
public:
static void Sleep(
    SleepLevel level, 
    HardwareEvent wakeUpEvents
)
static member Sleep : 
        level:SleepLevel * 
        wakeUpEvents:HardwareEvent -> unit 
public static function Sleep(
    level : SleepLevel, 
    wakeUpEvents : HardwareEvent
)

Parameters

Remarks

This method puts the device into a sleep state that is only awoken by the events described in wakeUpEvents. If the event type 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.

.NET Framework Security

See Also

Reference

PowerState Class

Microsoft.SPOT.Hardware Namespace