diff options
author | andru <7698720+AndruPol@users.noreply.github.com> | 2019-01-08 11:22:01 +0300 |
---|---|---|
committer | andru <7698720+AndruPol@users.noreply.github.com> | 2019-01-08 11:22:01 +0300 |
commit | 2168085ac76c280880a0c2262a7e63fd0ce7c952 (patch) | |
tree | 84cc3e094dbad1063034549f74ad7c617e5fe800 /os/hal/ports/NRF5/NRF52832/hal_lld.h | |
parent | 5af099c3665e49ce9323fa79c56a51bf67b9ebab (diff) | |
download | ChibiOS-Contrib-2168085ac76c280880a0c2262a7e63fd0ce7c952.tar.gz ChibiOS-Contrib-2168085ac76c280880a0c2262a7e63fd0ce7c952.tar.bz2 ChibiOS-Contrib-2168085ac76c280880a0c2262a7e63fd0ce7c952.zip |
added NRF52 pwm, icu, i2c, radio esb drivers
Diffstat (limited to 'os/hal/ports/NRF5/NRF52832/hal_lld.h')
-rw-r--r-- | os/hal/ports/NRF5/NRF52832/hal_lld.h | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/os/hal/ports/NRF5/NRF52832/hal_lld.h b/os/hal/ports/NRF5/NRF52832/hal_lld.h index 24784d3..a2a8cc3 100644 --- a/os/hal/ports/NRF5/NRF52832/hal_lld.h +++ b/os/hal/ports/NRF5/NRF52832/hal_lld.h @@ -60,22 +60,36 @@ /*===========================================================================*/ /** + * @brief Select source of High Frequency Clock (HFCLK) + * @details Possible values for source are: + * 0 : 64 MHz internal oscillator (HFINT) + * 1 : 32 MHz external crystal oscillator (HFXO) + */ +#if !defined(NRF5_HFCLK_SOURCE) || defined(__DOXYGEN__) +#define NRF5_HFCLK_SOURCE NRF5_HFCLK_HFINT +#endif + +/** * @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. + * 1 : External crystal + * 2 : Synthesized clock from High Frequency Clock (HFCLK) + * When crystal is not available it's preferable to use the + * internal RC oscillator that synthesizing the clock. */ #if !defined(NRF5_LFCLK_SOURCE) || defined(__DOXYGEN__) -#define NRF5_LFCLK_SOURCE 0 +#define NRF5_LFCLK_SOURCE NRF5_LFCLK_RC #endif /*===========================================================================*/ /* Derived constants and error checks. */ /*===========================================================================*/ +#if (NRF5_HFCLK_SOURCE < 0) || (NRF5_HFCLK_SOURCE > 1) +#error "Possible value for NRF5_HFCLK_SOURCE are HFINT=0, HFXO=1" +#endif + #if (NRF5_LFCLK_SOURCE < 0) || (NRF5_LFCLK_SOURCE > 2) #error "Possible value for NRF5_LFCLK_SOURCE are 0=RC, 1=XTAL, 2=Synth" #endif @@ -91,6 +105,14 @@ /*===========================================================================*/ /* External declarations. */ /*===========================================================================*/ +#if 0 // moved to board.h +#define NRF5_HFCLK_HFINT 0 +#define NRF5_HFCLK_HFXO 1 + +#define NRF5_LFCLK_RC 0 +#define NRF5_LFCLK_XTAL 1 +#define NRF5_LFCLK_SYNTH 2 +#endif #include "nvic.h" |