mbed library sources for TON Board V1.2
Fork of mbed-dev by
Diff: drivers/Ticker.cpp
- Revision:
- 167:e84263d55307
- Parent:
- 160:d5399cc887bb
--- 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(); }