Skip to content

Commit f57f0d4

Browse files
Merge pull request #5045 from maciejbocianski/ticker_fix
Ticker class description update - small interval warning
2 parents f0a1075 + 19ee9c1 commit f57f0d4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/Ticker.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,11 @@ class Ticker : public TimerEvent, private NonCopyable<Ticker> {
101101
*
102102
* @param func pointer to the function to be called
103103
* @param t the time between calls in micro-seconds
104+
*
105+
* @note setting @a t to a value shorter that it takes to process the ticker callback
106+
* will cause the system to hang. Ticker callback will be called constantly with no time
107+
* for threads scheduling.
108+
*
104109
*/
105110
void attach_us(Callback<void()> func, us_timestamp_t t) {
106111
// lock only for the initial callback setup

0 commit comments

Comments
 (0)