aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/NRF51/NRF51822/hal_lld.h
diff options
context:
space:
mode:
authorFabio Utzig <utzig@utzig.org>2016-02-15 18:12:37 -0200
committerFabio Utzig <utzig@utzig.org>2016-02-15 18:12:37 -0200
commitfac5a0d26c0d5a13d0847984ee96103441fab6cd (patch)
tree0a6898ee4bea921fdf53aaa48c0d9b7a6825cd82 /os/hal/ports/NRF51/NRF51822/hal_lld.h
parent97bf343a8b3cea8618965d93668ae98915088208 (diff)
parent5ef170def22f5327f3c8252799e9f499eb50e5a6 (diff)
downloadChibiOS-Contrib-fac5a0d26c0d5a13d0847984ee96103441fab6cd.tar.gz
ChibiOS-Contrib-fac5a0d26c0d5a13d0847984ee96103441fab6cd.tar.bz2
ChibiOS-Contrib-fac5a0d26c0d5a13d0847984ee96103441fab6cd.zip
Merge pull request #33 from sdalu/rtc
RTC for System Ticks
Diffstat (limited to 'os/hal/ports/NRF51/NRF51822/hal_lld.h')
-rw-r--r--os/hal/ports/NRF51/NRF51822/hal_lld.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/os/hal/ports/NRF51/NRF51822/hal_lld.h b/os/hal/ports/NRF51/NRF51822/hal_lld.h
index 436789c..283c207 100644
--- a/os/hal/ports/NRF51/NRF51822/hal_lld.h
+++ b/os/hal/ports/NRF51/NRF51822/hal_lld.h
@@ -39,14 +39,36 @@
* @}
*/
+/**
+ * @brief Frequency valuefor the Low Frequency Clock
+ */
+#define NRF51_LFCLK_FREQUENCY 32768
+
/*===========================================================================*/
/* Driver pre-compile time settings. */
/*===========================================================================*/
+/**
+ * @brief Select source of Low Frequency Clock (LFCLK)
+ * @details Possible values for source are:
+ * 0 : RC oscillator
+ * 1 : External cristal
+ * 2 : Synthetized clock from High Frequency Clock (HFCLK)
+ * When cristal is not available it's preferable to use the
+ * internal RC oscillator that synthezing the clock.
+ */
+#if !defined(NRF51_LFCLK_SOURCE) || defined(__DOXYGEN__)
+#define NRF51_LFCLK_SOURCE 0
+#endif
+
/*===========================================================================*/
/* Derived constants and error checks. */
/*===========================================================================*/
+#if (NRF51_LFCLK_SOURCE < 0) || (NRF51_LFCLK_SOURCE > 2)
+#error "Possible value for NRF51_LFCLK_SOURCE are 0=RC, 1=XTAL, 2=Synth"
+#endif
+
/*===========================================================================*/
/* Driver data structures and types. */
/*===========================================================================*/