Mbed OS Reference
Loading...
Searching...
No Matches
DeepSleepLock Class Reference

RAII object for disabling, then restoring the deep sleep mode Usage: More...

#include <DeepSleepLock.h>

Public Member Functions

void lock ()
 Mark the start of a locked deep sleep section. More...
 
void unlock ()
 Mark the end of a locked deep sleep section. More...
 

Detailed Description

RAII object for disabling, then restoring the deep sleep mode Usage:

void f() {
// some code here
{
// Code in this block will run with the deep sleep mode locked
}
// deep sleep mode will be restored to their previous state
}
RAII object for disabling, then restoring the deep sleep mode Usage:
Definition: DeepSleepLock.h:45
void lock()
Mark the start of a locked deep sleep section.

Definition at line 45 of file DeepSleepLock.h.

Member Function Documentation

◆ lock()

void lock ( )

Mark the start of a locked deep sleep section.

◆ unlock()

void unlock ( )

Mark the end of a locked deep sleep section.