Skip to content

mbed_wait_api: add comments to warn the func will lock deep sleep #6645

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 8, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions platform/mbed_wait_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,32 @@ extern "C" {
* the accuracy of single precision floating point).
*
* @param s number of seconds to wait
*
* @note
* If the RTOS is present, this function always spins to get the exact number of microseconds,
* which potentially affects power (such as preventing deep sleep) and multithread performance.
* You can avoid it by using Thread::wait().
*/
void wait(float s);

/** Waits a number of milliseconds.
*
* @param ms the whole number of milliseconds to wait
*
* @note
* If the RTOS is present, this function always spins to get the exact number of microseconds,
* which potentially affects power (such as preventing deep sleep) and multithread performance.
* You can avoid it by using Thread::wait().
*/
void wait_ms(int ms);

/** Waits a number of microseconds.
*
* @param us the whole number of microseconds to wait
*
* @note
* If the RTOS is present, this function always spins to get the exact number of microseconds,
* which potentially affects power (such as preventing deep sleep) and multithread performance.
*/
void wait_us(int us);

Expand Down