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
Changes from 3 commits
4c69419
efc228f
0462799
27ce443
c9b2640
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
* 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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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); | ||
|
||
|
There was a problem hiding this comment.
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()."