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 b75c51a commit 543660f
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions hal/mbed_sleep_manager.c
Expand Up @@ -78,4 +78,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 543660f

Please sign in to comment.