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
- level
Type: Microsoft.SPOT.Hardware. . :: . .SleepLevel
The level of sleep the system should enter. The behavior of the level is determined by the hardware vendor.
- wakeUpEvents
Type: Microsoft.SPOT.Hardware. . :: . .HardwareEvent
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 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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.