Sleep: add deepsleep locks for !DEVICE_SLEEP

If a target do not support sleep (no DEVICE_SLEEP defined),
we provide empty deep sleep locking.
pull/4912/head
Martin Kojtal 2017-08-15 14:38:06 +01:00
parent cb4e9b32a2
commit fcdb04351f
1 changed files with 21 additions and 0 deletions

View File

@ -68,4 +68,25 @@ void sleep_manager_sleep_auto(void)
core_util_critical_section_exit(); 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 #endif