aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
authorStephane D'Alu <sdalu@sdalu.com>2016-02-06 02:44:52 +0100
committerStephane D'Alu <sdalu@sdalu.com>2016-02-06 02:44:52 +0100
commit3679d705391bf29fa4d4d6b140cf2bf64d84456c (patch)
tree32071afcc86778c6f9c95f868fa96e91574d4b54 /os
parentf35c8058efe554ea6adb243baf0737220b65759e (diff)
downloadChibiOS-Contrib-3679d705391bf29fa4d4d6b140cf2bf64d84456c.tar.gz
ChibiOS-Contrib-3679d705391bf29fa4d4d6b140cf2bf64d84456c.tar.bz2
ChibiOS-Contrib-3679d705391bf29fa4d4d6b140cf2bf64d84456c.zip
fixed compile time error detection for deltatime
Diffstat (limited to 'os')
-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. */