aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--os/hal/ports/NRF51/NRF51822/st_lld.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/os/hal/ports/NRF51/NRF51822/st_lld.h b/os/hal/ports/NRF51/NRF51822/st_lld.h
index 412f4fd..54f7aae 100644
--- a/os/hal/ports/NRF51/NRF51822/st_lld.h
+++ b/os/hal/ports/NRF51/NRF51822/st_lld.h
@@ -66,14 +66,14 @@
#error "NRF51_SYSTEM_TICKS illegal value"
#endif
-#if defined(CH_CFG_ST_TIMEDELTA) && CH_CFG_ST_TIMEDELTA < 5
+#if OSAL_ST_MODE == OSAL_ST_MODE_FREERUNNING
+#if CH_CFG_ST_TIMEDELTA < 5
#error "CH_CFG_ST_TIMEDELTA is too low"
#endif
-
-#if (OSAL_ST_MODE == OSAL_ST_MODE_FREERUNNING) && \
- (NRF51_SYSTEM_TICKS == NRF51_SYSTEM_TICKS_AS_TIMER)
+#if NRF51_SYSTEM_TICKS == NRF51_SYSTEM_TICKS_AS_TIMER
#error "Freeruning (tick-less) mode not supported with TIMER, use RTC"
#endif
+#endif
/*===========================================================================*/
/* Driver data structures and types. */