mirror of https://github.com/ARMmbed/mbed-os.git
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.pull/5268/head
parent
3f8097dc63
commit
b5fe12942a
|
@ -263,6 +263,7 @@ timestamp_t ticker_read(const ticker_data_t *const ticker)
|
|||
|
||||
us_timestamp_t ticker_read_us(const ticker_data_t *const ticker)
|
||||
{
|
||||
initialize(ticker);
|
||||
update_present_time(ticker);
|
||||
return ticker->queue->present_time;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue