File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 22
22
#include " us_ticker_api.h"
23
23
#include " lp_ticker_api.h"
24
24
#include " mbed_critical.h"
25
- #include " mbed_assert .h"
25
+ #include " mbed_error .h"
26
26
#include < new>
27
27
28
28
/* This provides the marshalling point for a system global SysTimer, which
@@ -47,13 +47,12 @@ OsTimer *init_os_timer()
47
47
// Locking not required as it will be first called during
48
48
// OS init, or else we're a non-RTOS single-threaded setup.
49
49
if (!os_timer) {
50
- #if MBED_CONF_TARGET_TICKLESS_FROM_US_TICKER && DEVICE_USTICKER
51
- os_timer = new (os_timer_data) OsTimer (get_us_ticker_data ());
52
- #elif !MBED_CONF_TARGET_TICKLESS_FROM_US_TICKER && DEVICE_LPTICKER
50
+ #if DEVICE_LPTICKER && !MBED_CONF_TARGET_TICKLESS_FROM_US_TICKER
53
51
os_timer = new (os_timer_data) OsTimer (get_lp_ticker_data ());
52
+ #elif DEVICE_USTICKER
53
+ os_timer = new (os_timer_data) OsTimer (get_us_ticker_data ());
54
54
#else
55
- MBED_ASSERT (" OS timer not available - check MBED_CONF_TARGET_TICKLESS_FROM_US_TICKER" && false );
56
- return NULL ;
55
+ error (" OS timer not available - check MBED_CONF_TARGET_TICKLESS_FROM_US_TICKER" );
57
56
#endif
58
57
// os_timer->setup_irq();
59
58
}
You can’t perform that action at this time.
0 commit comments