File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 2121 */
2222#include " rtos/TARGET_CORTEX/SysTimer.h"
2323
24- #if DEVICE_LPTICKER
24+ #if MBED_TICKLESS
2525
26+ #include " hal/us_ticker_api.h"
2627#include " hal/lp_ticker_api.h"
2728#include " mbed_critical.h"
2829#include " mbed_assert.h"
@@ -58,7 +59,12 @@ namespace rtos {
5859namespace internal {
5960
6061SysTimer::SysTimer () :
61- TimerEvent (get_lp_ticker_data()), _time_us(0 ), _tick(0 )
62+ #if DEVICE_LPTICKER
63+ TimerEvent (get_lp_ticker_data()),
64+ #else
65+ TimerEvent (get_us_ticker_data()),
66+ #endif
67+ _time_us (0 ), _tick(0 )
6268{
6369 _time_us = ticker_read_us (_ticker_data);
6470 _suspend_time_passed = true ;
@@ -69,6 +75,8 @@ SysTimer::SysTimer(const ticker_data_t *data) :
6975 TimerEvent (data), _time_us(0 ), _tick(0 )
7076{
7177 _time_us = ticker_read_us (_ticker_data);
78+ _suspend_time_passed = true ;
79+ _suspended = false ;
7280}
7381
7482void SysTimer::setup_irq ()
@@ -194,4 +202,4 @@ void SysTimer::handler()
194202}
195203}
196204
197- #endif
205+ #endif // MBED_TICKLESS
Original file line number Diff line number Diff line change 2222#ifndef MBED_SYS_TIMER_H
2323#define MBED_SYS_TIMER_H
2424
25- #if DEVICE_LPTICKER || defined(DOXYGEN_ONLY)
25+ #if MBED_TICKLESS || defined(DOXYGEN_ONLY)
2626
2727#include " platform/NonCopyable.h"
2828#include " drivers/TimerEvent.h"
You can’t perform that action at this time.
0 commit comments