test
Fork of mbed-dev by
Diff: drivers/Ticker.cpp
- Revision:
- 168:e84263d55307
- Parent:
- 160:d5399cc887bb
- Child:
- 175:b96e65c34a4d
diff -r c97ed07ec1a8 -r e84263d55307 drivers/Ticker.cpp --- a/drivers/Ticker.cpp Thu Jun 08 15:02:37 2017 +0100 +++ b/drivers/Ticker.cpp Wed Jun 21 17:46:44 2017 +0100 @@ -29,16 +29,16 @@ core_util_critical_section_exit(); } -void Ticker::setup(timestamp_t t) { +void Ticker::setup(us_timestamp_t t) { core_util_critical_section_enter(); remove(); _delay = t; - insert(_delay + ticker_read(_ticker_data)); + insert_absolute(_delay + ticker_read_us(_ticker_data)); core_util_critical_section_exit(); } void Ticker::handler() { - insert(event.timestamp + _delay); + insert_absolute(event.timestamp + _delay); _function(); }