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/5194/head
Russ Butler 2017-09-25 15:37:31 -05:00 committed by Martin Kojtal
parent bb61b42fba
commit 8183749948
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}