diff options
author | Stephane D'Alu <sdalu@sdalu.com> | 2016-02-14 16:09:37 +0100 |
---|---|---|
committer | Stephane D'Alu <sdalu@sdalu.com> | 2016-02-14 16:09:37 +0100 |
commit | a1c71cd5a081de9573a184e2a9379d6b47f4fde8 (patch) | |
tree | f271c8da5526617c69ac5401fb045619b6a8800f | |
parent | ed35ba38183776a0864e094c78660414c26c93a9 (diff) | |
download | ChibiOS-Contrib-a1c71cd5a081de9573a184e2a9379d6b47f4fde8.tar.gz ChibiOS-Contrib-a1c71cd5a081de9573a184e2a9379d6b47f4fde8.tar.bz2 ChibiOS-Contrib-a1c71cd5a081de9573a184e2a9379d6b47f4fde8.zip |
st handle compile-tie error checking instead of gpt, as gpt is included first
-rw-r--r-- | os/hal/ports/NRF51/NRF51822/gpt_lld.h | 5 | ||||
-rw-r--r-- | os/hal/ports/NRF51/NRF51822/st_lld.h | 9 |
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
|