@@ -55,9 +55,9 @@ extern "C" {
55
55
* @param s number of seconds to wait
56
56
*
57
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 ThisThread::sleep_for() .
58
+ * If the RTOS is present, this function spins to get the exact number of microseconds for
59
+ * microsecond precision up to 10 milliseconds. If delay is larger than 10 milliseconds and not in ISR, it is the same as
60
+ * `wait_ms`. We recommend `wait_us` and `wait_ms` over `wait` .
61
61
*/
62
62
void wait (float s );
63
63
@@ -66,9 +66,8 @@ void wait(float s);
66
66
* @param ms the whole number of milliseconds to wait
67
67
*
68
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 ThisThread::sleep_for().
69
+ * If the RTOS is present, it calls ThisThread::sleep_for(), which is same as CMSIS osDelay().
70
+ * You can't call this from interrupts, and it doesn't lock hardware sleep.
72
71
*/
73
72
void wait_ms (int ms );
74
73
@@ -77,8 +76,9 @@ void wait_ms(int ms);
77
76
* @param us the whole number of microseconds to wait
78
77
*
79
78
* @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.
79
+ * This function always spins to get the exact number of microseconds.
80
+ * If RTOS is present, this will affect power (by preventing deep sleep) and
81
+ * multithread performance. Therefore, spinning for millisecond wait is not recommended.
82
82
*/
83
83
void wait_us (int us );
84
84
0 commit comments