File tree Expand file tree Collapse file tree 2 files changed +5
-11
lines changed
rtos/source/TARGET_CORTEX Expand file tree Collapse file tree 2 files changed +5
-11
lines changed Original file line number Diff line number Diff line change 2222#include " us_ticker_api.h"
2323#include " lp_ticker_api.h"
2424#include " mbed_critical.h"
25- #include " mbed_assert .h"
25+ #include " mbed_error .h"
2626#include < new>
2727
2828/* This provides the marshalling point for a system global SysTimer, which
@@ -47,15 +47,13 @@ OsTimer *init_os_timer()
4747 // Locking not required as it will be first called during
4848 // OS init, or else we're a non-RTOS single-threaded setup.
4949 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
5351 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 ());
5454#else
55- MBED_ASSERT (" OS timer not available - check MBED_CONF_TARGET_TICKLESS_FROM_US_TICKER" && false );
56- return NULL ;
55+ MBED_ERROR (" OS timer not available" );
5756#endif
58- // os_timer->setup_irq();
5957 }
6058
6159 return os_timer;
Original file line number Diff line number Diff line change @@ -42,10 +42,6 @@ extern "C" {
4242
4343#if MBED_CONF_TARGET_TICKLESS_FROM_US_TICKER && !DEVICE_USTICKER
4444#error Microsecond ticker required when MBED_CONF_TARGET_TICKLESS_FROM_US_TICKER is true
45- #endif
46-
47- #if !MBED_CONF_TARGET_TICKLESS_FROM_US_TICKER && !DEVICE_LPTICKER
48- #error Low power ticker required when MBED_CONF_TARGET_TICKLESS_FROM_US_TICKER is false
4945#endif
5046
5147 // Setup OS Tick timer to generate periodic RTOS Kernel Ticks
You can’t perform that action at this time.
0 commit comments