From aa7a8058d8539ee20e726dd0de8854676764d885 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Sun, 28 Oct 2018 19:56:55 +0100 Subject: [PATCH] boards/ruuvitag: also use nrf52 common place --- boards/ruuvitag/Makefile.dep | 5 +-- boards/ruuvitag/Makefile.features | 10 +----- boards/ruuvitag/include/periph_conf.h | 46 +++------------------------ 3 files changed, 8 insertions(+), 53 deletions(-) diff --git a/boards/ruuvitag/Makefile.dep b/boards/ruuvitag/Makefile.dep index 90e64ed841..444cdf5d7e 100644 --- a/boards/ruuvitag/Makefile.dep +++ b/boards/ruuvitag/Makefile.dep @@ -1,6 +1,5 @@ -include $(RIOTBOARD)/common/nrf52xxxdk/Makefile.dep - ifneq (,$(filter saul_default,$(USEMODULE))) + USEMODULE += saul_gpio USEMODULE += lis2dh12_spi # TODO: enable drivers once their adaption/implementations are merged # USEMODULE += bme280_spi @@ -9,3 +8,5 @@ endif ifneq (,$(filter gnrc_netdev_default,$(USEMODULE))) USEMODULE += nrfmin endif + +include $(RIOTBOARD)/common/nrf52/Makefile.dep diff --git a/boards/ruuvitag/Makefile.features b/boards/ruuvitag/Makefile.features index dbd8a3514b..e201287c34 100644 --- a/boards/ruuvitag/Makefile.features +++ b/boards/ruuvitag/Makefile.features @@ -1,13 +1,5 @@ # Put defined MCU peripherals here (in alphabetical order) -FEATURES_PROVIDED += periph_gpio periph_gpio_irq -FEATURES_PROVIDED += periph_rtt FEATURES_PROVIDED += periph_spi -FEATURES_PROVIDED += periph_timer FEATURES_PROVIDED += periph_uart -# Various other features (if any) - -# The board MPU family (used for grouping by the CI system) -FEATURES_MCU_GROUP = cortex_m4_3 - -include $(RIOTCPU)/nrf52/Makefile.features +include $(RIOTBOARD)/common/nrf52/Makefile.features diff --git a/boards/ruuvitag/include/periph_conf.h b/boards/ruuvitag/include/periph_conf.h index 95105cf71e..eaab812e48 100644 --- a/boards/ruuvitag/include/periph_conf.h +++ b/boards/ruuvitag/include/periph_conf.h @@ -21,53 +21,14 @@ #define PERIPH_CONF_H #include "periph_cpu.h" +#include "cfg_clock_32_1.h" +#include "cfg_rtt_default.h" +#include "cfg_timer_default.h" #ifdef __cplusplus extern "C" { #endif -/** - * @name Clock configuration - * - * @note The radio will not work with the internal RC oscillator! - * - * @{ - */ -#define CLOCK_HFCLK (32U) /* set to 0: internal RC oscillator - * 32: 32MHz crystal */ -#define CLOCK_LFCLK (1) /* set to 0: internal RC oscillator - * 1: 32.768 kHz crystal - * 2: derived from HFCLK */ -/** @} */ - -/** - * @name Timer configuration - * @{ - */ -static const timer_conf_t timer_config[] = { - { - .dev = NRF_TIMER1, - .channels = 3, - .bitmode = TIMER_BITMODE_BITMODE_32Bit, - .irqn = TIMER1_IRQn - } -}; - -#define TIMER_0_ISR isr_timer1 - -#define TIMER_NUMOF (sizeof(timer_config) / sizeof(timer_config[0])) -/** @} */ - -/** - * @name Real time counter configuration - * @{ - */ -#define RTT_NUMOF (1U) -#define RTT_DEV (1) /* NRF_RTC1 */ -#define RTT_MAX_VALUE (0x00ffffff) -#define RTT_FREQUENCY (1024) -/** @} */ - /** * @name SPI configuration * @{ @@ -98,3 +59,4 @@ static const spi_conf_t spi_config[] = { #endif #endif /* PERIPH_CONF_H */ +/** @} */