Skip to content

Commit db44c8f

Browse files
committed
Fix MBED_ERROR call in init_os_timer
1 parent ad40b1b commit db44c8f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

platform/source/mbed_os_timer.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,13 @@ OsTimer *init_os_timer()
5252
#elif DEVICE_USTICKER
5353
os_timer = new (os_timer_data) OsTimer(get_us_ticker_data());
5454
#else
55-
MBED_ERROR("OS timer not available");
55+
#if MBED_TRAP_ERRORS_ENABLED
56+
MBED_ERROR(
57+
MBED_MAKE_ERROR(
58+
MBED_MODULE_PLATFORM,
59+
MBED_ERROR_CODE_CONFIG_UNSUPPORTED),
60+
"OS timer not available");
61+
#endif
5662
#endif
5763
}
5864

0 commit comments

Comments
 (0)