Skip to content

Commit 6fef430

Browse files
committed
Ticker: Move ticker initialisation to object creation time
Having it in the attach call introduces extra latency and can break short delays, for the first usage.
1 parent 7203be9 commit 6fef430

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

hal/api/Ticker.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ class Ticker : public TimerEvent {
6363
}
6464

6565
Ticker(const ticker_data_t *data) : TimerEvent(data) {
66+
data->interface->init();
6667
}
6768

6869
/** Attach a function to be called by the Ticker, specifiying the interval in seconds

0 commit comments

Comments
 (0)