Skip to content

Commit

Permalink
Sleep: add deepsleep locks for !DEVICE_SLEEP
Browse files Browse the repository at this point in the history
If a target do not support sleep (no DEVICE_SLEEP defined),
we provide empty deep sleep locking.
  • Loading branch information
0xc0170 committed Aug 17, 2017
1 parent 5946d67 commit 568c620
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions hal/mbed_sleep_manager.c
Expand Up @@ -77,4 +77,25 @@ void sleep_manager_sleep_auto(void)
core_util_critical_section_exit();
}

#else

// locking is valid only if DEVICE_SLEEP is defined
// we provide empty implementation

void sleep_manager_lock_deep_sleep(void)
{

}

void sleep_manager_unlock_deep_sleep(void)
{

}

bool sleep_manager_can_deep_sleep(void)
{
// no sleep implemented
return false;
}

#endif

0 comments on commit 568c620

Please sign in to comment.