Skip to content

Commit 8183749

Browse files
c1728p90xc0170
authored andcommitted
Initialize the HAL ticker on first read
Initialize the ticker on the first call to ticker_read* if the ticker has not been initialized already.
1 parent bb61b42 commit 8183749

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

hal/mbed_ticker_api.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ timestamp_t ticker_read(const ticker_data_t *const ticker)
263263

264264
us_timestamp_t ticker_read_us(const ticker_data_t *const ticker)
265265
{
266+
initialize(ticker);
266267
update_present_time(ticker);
267268
return ticker->queue->present_time;
268269
}

0 commit comments

Comments
 (0)