diff options
Diffstat (limited to 'os/hal/ports/NRF51/NRF51822/st_lld.h')
-rw-r--r-- | os/hal/ports/NRF51/NRF51822/st_lld.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/os/hal/ports/NRF51/NRF51822/st_lld.h b/os/hal/ports/NRF51/NRF51822/st_lld.h index 2e0672e..c62ff2c 100644 --- a/os/hal/ports/NRF51/NRF51822/st_lld.h +++ b/os/hal/ports/NRF51/NRF51822/st_lld.h @@ -31,14 +31,39 @@ /* Driver constants. */
/*===========================================================================*/
+/**
+ * @brief SPI0 interrupt priority level setting.
+ */
+#define NRF51_SYSTEM_TICKS_AS_TIMER 1
+
+/**
+ * @brief SPI0 interrupt priority level setting.
+ */
+#define NRF51_SYSTEM_TICKS_AS_RTC 2
+
/*===========================================================================*/
/* Driver pre-compile time settings. */
/*===========================================================================*/
+/**
+ * @brief Select the method to generates system ticks
+ * @details Possibles values are:
+ * NRF51_SYSTEM_TICKS_AS_TIMER for TIMER0
+ * NRF51_SYSTEM_TICKS_AS_RTC for RTC0
+ */
+#if !defined(NRF51_SYSTEM_TICKS) || defined(__DOXYGEN__)
+#define NRF51_SYSTEM_TICKS NRF51_SYSTEM_TICKS_AS_RTC
+#endif
+
/*===========================================================================*/
/* Derived constants and error checks. */
/*===========================================================================*/
+#if ((NRF51_SYSTEM_TICKS != NRF51_SYSTEM_TICKS_AS_RTC) && \
+ (NRF51_SYSTEM_TICKS != NRF51_SYSTEM_TICKS_AS_TIMER))
+#error "NRF51_SYSTEM_TICKS illegal value"
+#endif
+
/*===========================================================================*/
/* Driver data structures and types. */
/*===========================================================================*/
|