From 7b9d3b32caf3db0760e6c59f87bb8531e8c420c1 Mon Sep 17 00:00:00 2001 From: Hauke Petersen Date: Tue, 29 Aug 2017 14:12:39 +0200 Subject: [PATCH] boards/nrf51-based: share CLOCK_CORECLOCK define --- boards/airfy-beacon/include/periph_conf.h | 1 - boards/calliope-mini/include/periph_conf.h | 1 - boards/microbit/include/periph_conf.h | 1 - boards/nrf51dongle/include/periph_conf.h | 1 - boards/nrf6310/include/periph_conf.h | 1 - boards/pca10000/include/periph_conf.h | 1 - boards/pca10005/include/periph_conf.h | 1 - boards/yunjia-nrf51822/include/periph_conf.h | 1 - cpu/nrf51/include/periph_cpu.h | 5 +++++ 9 files changed, 5 insertions(+), 8 deletions(-) diff --git a/boards/airfy-beacon/include/periph_conf.h b/boards/airfy-beacon/include/periph_conf.h index 4831b6b824..620d15760c 100644 --- a/boards/airfy-beacon/include/periph_conf.h +++ b/boards/airfy-beacon/include/periph_conf.h @@ -33,7 +33,6 @@ * * @{ */ -#define CLOCK_CORECLOCK (16000000U) /* fixed for all nRF51822 */ #define CLOCK_HFCLK (16U) /* set to 0: internal RC oscillator 16: 16MHz crystal 32: 32MHz crystal */ diff --git a/boards/calliope-mini/include/periph_conf.h b/boards/calliope-mini/include/periph_conf.h index 4680d07cb3..9578073058 100644 --- a/boards/calliope-mini/include/periph_conf.h +++ b/boards/calliope-mini/include/periph_conf.h @@ -32,7 +32,6 @@ extern "C" { * * @{ */ -#define CLOCK_CORECLOCK (16000000U) /* fixed for all nRF51822 */ #define CLOCK_HFCLK (16U) /* set to 0: internal RC oscillator 16: 16MHz crystal 32: 32MHz crystal */ diff --git a/boards/microbit/include/periph_conf.h b/boards/microbit/include/periph_conf.h index 804a0cf226..ed0ccd0425 100644 --- a/boards/microbit/include/periph_conf.h +++ b/boards/microbit/include/periph_conf.h @@ -32,7 +32,6 @@ extern "C" { * * @{ */ -#define CLOCK_CORECLOCK (16000000U) /* fixed for all nRF51822 */ #define CLOCK_HFCLK (16U) /* set to 0: internal RC oscillator 16: 16MHz crystal 32: 32MHz crystal */ diff --git a/boards/nrf51dongle/include/periph_conf.h b/boards/nrf51dongle/include/periph_conf.h index 315c61fecc..cfa34d41bc 100644 --- a/boards/nrf51dongle/include/periph_conf.h +++ b/boards/nrf51dongle/include/periph_conf.h @@ -32,7 +32,6 @@ extern "C" { * * @{ */ -#define CLOCK_CORECLOCK (16000000U) /* fixed for all nRF51822 */ #define CLOCK_HFCLK (16U) /* set to 0: internal RC oscillator 16: 16MHz crystal 32: 32MHz crystal */ diff --git a/boards/nrf6310/include/periph_conf.h b/boards/nrf6310/include/periph_conf.h index f2cfa01ff4..67d63b06a7 100644 --- a/boards/nrf6310/include/periph_conf.h +++ b/boards/nrf6310/include/periph_conf.h @@ -35,7 +35,6 @@ extern "C" { * * @{ */ -#define CLOCK_CORECLOCK (16000000U) /* fixed for all nRF51822 */ #define CLOCK_HFCLK (16U) /* set to 0: internal RC oscillator 16: 16MHz crystal 32: 32MHz crystal */ diff --git a/boards/pca10000/include/periph_conf.h b/boards/pca10000/include/periph_conf.h index d95e9a7930..64c4a7e2e1 100644 --- a/boards/pca10000/include/periph_conf.h +++ b/boards/pca10000/include/periph_conf.h @@ -34,7 +34,6 @@ extern "C" { * * @{ */ -#define CLOCK_CORECLOCK (16000000U) /* fixed for all nRF51822 */ #define CLOCK_HFCLK (16U) /* set to 0: internal RC oscillator 16: 16MHz crystal 32: 32MHz crystal */ diff --git a/boards/pca10005/include/periph_conf.h b/boards/pca10005/include/periph_conf.h index 26c290f075..3e1435f9a2 100644 --- a/boards/pca10005/include/periph_conf.h +++ b/boards/pca10005/include/periph_conf.h @@ -34,7 +34,6 @@ extern "C" { * * @{ */ -#define CLOCK_CORECLOCK (16000000U) /* fixed for all nRF51822 */ #define CLOCK_HFCLK (16U) /* set to 0: internal RC oscillator 16: 16MHz crystal 32: 32MHz crystal */ diff --git a/boards/yunjia-nrf51822/include/periph_conf.h b/boards/yunjia-nrf51822/include/periph_conf.h index f37321198b..50992a1065 100644 --- a/boards/yunjia-nrf51822/include/periph_conf.h +++ b/boards/yunjia-nrf51822/include/periph_conf.h @@ -32,7 +32,6 @@ extern "C" { * * @{ */ -#define CLOCK_CORECLOCK (16000000U) /* fixed for all nRF51822 */ #define CLOCK_HFCLK (16U) /* set to 0: internal RC oscillator 16: 16MHz crystal 32: 32MHz crystal */ diff --git a/cpu/nrf51/include/periph_cpu.h b/cpu/nrf51/include/periph_cpu.h index d41b968a5e..251bd319c7 100644 --- a/cpu/nrf51/include/periph_cpu.h +++ b/cpu/nrf51/include/periph_cpu.h @@ -25,6 +25,11 @@ extern "C" { #endif +/** + * @brief System core clock speed, fixed to 16MHz for all NRF51x CPUs + */ +#define CLOCK_CORECLOCK (16000000U) + /** * @brief Redefine some peripheral names to unify them between nRF51 and 52 * @{