diff --git a/rtos/TARGET_CORTEX/mbed_rtx_idle.cpp b/rtos/TARGET_CORTEX/mbed_rtx_idle.cpp index 3d0e6a12ab..83db8253aa 100644 --- a/rtos/TARGET_CORTEX/mbed_rtx_idle.cpp +++ b/rtos/TARGET_CORTEX/mbed_rtx_idle.cpp @@ -34,7 +34,7 @@ extern "C" { using namespace mbed; -#ifdef MBED_TICKLESS +#if (defined(MBED_TICKLESS) && defined(DEVICE_LPTICKER)) #include "rtos/TARGET_CORTEX/SysTimer.h" @@ -129,7 +129,7 @@ static void default_idle_hook(void) core_util_critical_section_exit(); } -#endif // MBED_TICKLESS +#endif // (defined(MBED_TICKLESS) && defined(DEVICE_LPTICKER)) static void (*idle_hook_fptr)(void) = &default_idle_hook;