aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/NRF51/NRF51822
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/ports/NRF51/NRF51822')
-rw-r--r--os/hal/ports/NRF51/NRF51822/gpt_lld.h5
-rw-r--r--os/hal/ports/NRF51/NRF51822/st_lld.h9
2 files changed, 8 insertions, 6 deletions
diff --git a/os/hal/ports/NRF51/NRF51822/gpt_lld.h b/os/hal/ports/NRF51/NRF51822/gpt_lld.h
index 0e3b544..2c84d6c 100644
--- a/os/hal/ports/NRF51/NRF51822/gpt_lld.h
+++ b/os/hal/ports/NRF51/NRF51822/gpt_lld.h
@@ -97,11 +97,6 @@
#error "GPT driver activated but no TIMER peripheral assigned"
#endif
-#if (NRF51_GPT_USE_TIMER0 == TRUE) && \
- (NRF51_SYSTEM_TICKS == NRF51_SYSTEM_TICKS_AS_TIMER)
-#error "GPT driver can't use TIMER0 as currently used by ST driver"
-#endif
-
#if 0
#if NRF51_GPT_USE_TIMER0 && \
!OSAL_IRQ_IS_VALID_PRIORITY(NRF51_GPT_TIMER0_IRQ_PRIORITY)
diff --git a/os/hal/ports/NRF51/NRF51822/st_lld.h b/os/hal/ports/NRF51/NRF51822/st_lld.h
index c6cf201..54dabda 100644
--- a/os/hal/ports/NRF51/NRF51822/st_lld.h
+++ b/os/hal/ports/NRF51/NRF51822/st_lld.h
@@ -61,7 +61,14 @@
/* Derived constants and error checks. */
/*===========================================================================*/
-#if ((NRF51_SYSTEM_TICKS != NRF51_SYSTEM_TICKS_AS_RTC) && \
+#if (OSAL_ST_MODE != OSAL_ST_MODE_NONE)
+#if (NRF51_GPT_USE_TIMER0 == TRUE) && \
+ (NRF51_SYSTEM_TICKS == NRF51_SYSTEM_TICKS_AS_TIMER)
+#error "TIMER0 already used by GPT driver"
+#endif
+#endif
+
+#if ((NRF51_SYSTEM_TICKS != NRF51_SYSTEM_TICKS_AS_RTC) && \
(NRF51_SYSTEM_TICKS != NRF51_SYSTEM_TICKS_AS_TIMER))
#error "NRF51_SYSTEM_TICKS illegal value"
#endif