Commit 09e61d97 authored by schneider's avatar schneider
Browse files

doc(sleep): Add docs for epic_sleep()

parent 657b062c
Pipeline #5260 passed with stages
in 29 seconds
......@@ -336,7 +336,24 @@ API(API_SYSTEM_EXEC, int __epic_exec(char *name));
*/
API(API_SYSTEM_RESET, void epic_system_reset(void));
API(API_SLEEP, void epic_sleep(uint32_t ms));
/**
* Sleep for the specified amount of time.
*
* This call will block for at most the specified amount of time. It allows epicardium to
* reduce clock speed of the system until this call is finished.
*
* This call returns early if an interrupt is signaled from epicardium.
*
* The clock source of epicardium has a limited amount of accuracy. Tolerances
* of +- 10% have been observed. This means that the sleep time also has a
* tolarance of at least +- 10%. The exact amount varies from device to device and
* also with temperature. You should take this into consideration when selecting
* the time you want to sleep.
*
* :param ms: Time to wait in milliseconds
* :returns: 0 if no interrupt happened, ``INT_MAX`` if an interrupt happened and the sleep ended early.
*/
API(API_SLEEP, int epic_sleep(uint32_t ms));
/**
* PMIC API
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment