Skip to content
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

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

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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 14 additions & 0 deletions platform/mbed_wait_api.h
Expand Up @@ -53,18 +53,32 @@ extern "C" {
* the accuracy of single precision floating point).
*
* @param s number of seconds to wait
*
* @note
* This func always spin to get an exact number of microseconds, potentially
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change to "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()."

* impacting power(like can't deep sleep) and multi-thread performance.
* You can avoided by Thread::wait().
*/
void wait(float s);

/** Waits a number of milliseconds.
*
* @param ms the whole number of milliseconds to wait
*
* @note
* This func always spin to get an exact number of microseconds, potentially
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change to "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()."

* impacting power(like can't deep sleep) and multi-thread performance.
* You can avoided by Thread::wait().
*/
void wait_ms(int ms);

/** Waits a number of microseconds.
*
* @param us the whole number of microseconds to wait
*
* @note
* This func always spin to get an exact number of microseconds, potentially
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change to "This function always spins to get the exact number of microseconds, which potentially affects power (such as preventing deep sleep) and multithread performance."

* impacting power(like can't deep sleep) and multi-thread performance.
*/
void wait_us(int us);

Expand Down