Skip to content

Commit 68ad00f

Browse files
author
Cruz Monrreal
authored
Merge pull request #6645 from woodsking2/master
mbed_wait_api: add comments to warn the func will lock deep sleep
2 parents adcd7ec + c9b2640 commit 68ad00f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

platform/mbed_wait_api.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,32 @@ extern "C" {
5353
* the accuracy of single precision floating point).
5454
*
5555
* @param s number of seconds to wait
56+
*
57+
* @note
58+
* If the RTOS is present, this function always spins to get the exact number of microseconds,
59+
* which potentially affects power (such as preventing deep sleep) and multithread performance.
60+
* You can avoid it by using Thread::wait().
5661
*/
5762
void wait(float s);
5863

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

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

0 commit comments

Comments
 (0)