diff options
author | Stephane D'Alu <sdalu@sdalu.com> | 2016-02-05 23:54:23 +0100 |
---|---|---|
committer | Stephane D'Alu <sdalu@sdalu.com> | 2016-02-05 23:54:23 +0100 |
commit | 8fe62a0f907639db23f14d17a45a7970854f1d22 (patch) | |
tree | 94ed5d7c466003fabd19065fc74906d30dced297 /os/hal/ports/NRF51/NRF51822/hal_lld.h | |
parent | 80af295f27f0fc5daaaea04cb249d3ad3704d338 (diff) | |
download | ChibiOS-Contrib-8fe62a0f907639db23f14d17a45a7970854f1d22.tar.gz ChibiOS-Contrib-8fe62a0f907639db23f14d17a45a7970854f1d22.tar.bz2 ChibiOS-Contrib-8fe62a0f907639db23f14d17a45a7970854f1d22.zip |
use mcuconf.h with NRF51_SYSTEM_TICKS to select the timer source (TIMER or RTC)
Diffstat (limited to 'os/hal/ports/NRF51/NRF51822/hal_lld.h')
-rw-r--r-- | os/hal/ports/NRF51/NRF51822/hal_lld.h | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/os/hal/ports/NRF51/NRF51822/hal_lld.h b/os/hal/ports/NRF51/NRF51822/hal_lld.h index b685667..24eff21 100644 --- a/os/hal/ports/NRF51/NRF51822/hal_lld.h +++ b/os/hal/ports/NRF51/NRF51822/hal_lld.h @@ -39,15 +39,35 @@ * @} */ +/** + * @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 + /*===========================================================================*/ -/* Driver constants and error checks. */ +/* Derived constants and error checks. */ /*===========================================================================*/ -#define NRF51_LFCLK_FREQUENCY 32768 +#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. */ |