From e1b356e88486ed2048cb5ed56075bf12b1734d40 Mon Sep 17 00:00:00 2001 From: Bas Stottelaar Date: Wed, 18 Nov 2020 01:37:57 +0100 Subject: [PATCH] boards/efm32: enable efm32_coretemp driver --- boards/common/slwstk6000b/Makefile.dep | 1 + boards/common/slwstk6000b/include/board.h | 10 ++++++++++ boards/ikea-tradfri/Makefile.dep | 1 + boards/ikea-tradfri/include/board.h | 10 ++++++++++ boards/slstk3401a/Makefile.dep | 1 + boards/slstk3401a/include/board.h | 10 ++++++++++ boards/slstk3402a/Makefile.dep | 1 + boards/slstk3402a/include/board.h | 10 ++++++++++ boards/sltb001a/Makefile.dep | 1 + boards/sltb001a/include/board.h | 10 ++++++++++ boards/slwstk6220a/Makefile.dep | 1 + boards/slwstk6220a/include/board.h | 10 ++++++++++ boards/stk3200/Makefile.dep | 1 + boards/stk3200/include/board.h | 10 ++++++++++ boards/stk3600/Makefile.dep | 1 + boards/stk3600/include/board.h | 10 ++++++++++ boards/stk3700/Makefile.dep | 1 + boards/stk3700/include/board.h | 10 ++++++++++ 18 files changed, 99 insertions(+) diff --git a/boards/common/slwstk6000b/Makefile.dep b/boards/common/slwstk6000b/Makefile.dep index eb037e2587..1208c3a05e 100644 --- a/boards/common/slwstk6000b/Makefile.dep +++ b/boards/common/slwstk6000b/Makefile.dep @@ -1,4 +1,5 @@ ifneq (,$(filter saul_default,$(USEMODULE))) + USEMODULE += efm32_coretemp USEMODULE += saul_gpio USEMODULE += si7021 endif diff --git a/boards/common/slwstk6000b/include/board.h b/boards/common/slwstk6000b/include/board.h index 0250538ded..0f1092bfc7 100644 --- a/boards/common/slwstk6000b/include/board.h +++ b/boards/common/slwstk6000b/include/board.h @@ -23,6 +23,7 @@ #include "cpu.h" #include "periph_conf.h" +#include "periph/adc.h" #include "periph/gpio.h" #include "periph/spi.h" @@ -87,6 +88,15 @@ extern "C" { #define LED1_TOGGLE gpio_toggle(LED1_PIN) /** @} */ +/** + * @name Core temperature sensor configuration + * + * Connection to the on-chip temperature sensor. + * @{ + */ +#define CORETEMP_ADC ADC_LINE(0) +/** @} */ + /** * @name Display configuration * diff --git a/boards/ikea-tradfri/Makefile.dep b/boards/ikea-tradfri/Makefile.dep index fdeeef633f..7e8004b0ac 100644 --- a/boards/ikea-tradfri/Makefile.dep +++ b/boards/ikea-tradfri/Makefile.dep @@ -1,4 +1,5 @@ ifneq (,$(filter saul_default,$(USEMODULE))) + USEMODULE += efm32_coretemp USEMODULE += saul_gpio endif diff --git a/boards/ikea-tradfri/include/board.h b/boards/ikea-tradfri/include/board.h index c6e508df39..8a44ab7160 100644 --- a/boards/ikea-tradfri/include/board.h +++ b/boards/ikea-tradfri/include/board.h @@ -21,6 +21,7 @@ #include "cpu.h" #include "periph_conf.h" +#include "periph/adc.h" #include "periph/gpio.h" #include "periph/spi.h" @@ -69,6 +70,15 @@ extern "C" { #define LED1_TOGGLE gpio_toggle(LED1_PIN) /** @} */ +/** + * @name Core temperature sensor configuration + * + * Connection to the on-chip temperature sensor. + * @{ + */ +#define CORETEMP_ADC ADC_LINE(0) +/** @} */ + /** * @name SPI NOR Flash hardware configuration * diff --git a/boards/slstk3401a/Makefile.dep b/boards/slstk3401a/Makefile.dep index eb037e2587..1208c3a05e 100644 --- a/boards/slstk3401a/Makefile.dep +++ b/boards/slstk3401a/Makefile.dep @@ -1,4 +1,5 @@ ifneq (,$(filter saul_default,$(USEMODULE))) + USEMODULE += efm32_coretemp USEMODULE += saul_gpio USEMODULE += si7021 endif diff --git a/boards/slstk3401a/include/board.h b/boards/slstk3401a/include/board.h index 656f136ce8..34ae39817b 100644 --- a/boards/slstk3401a/include/board.h +++ b/boards/slstk3401a/include/board.h @@ -22,6 +22,7 @@ #include "cpu.h" #include "periph_conf.h" +#include "periph/adc.h" #include "periph/gpio.h" #include "periph/spi.h" @@ -86,6 +87,15 @@ extern "C" { #define LED1_TOGGLE gpio_toggle(LED1_PIN) /** @} */ +/** + * @name Core temperature sensor configuration + * + * Connection to the on-chip temperature sensor. + * @{ + */ +#define CORETEMP_ADC ADC_LINE(0) +/** @} */ + /** * @name Display configuration * diff --git a/boards/slstk3402a/Makefile.dep b/boards/slstk3402a/Makefile.dep index eb037e2587..1208c3a05e 100644 --- a/boards/slstk3402a/Makefile.dep +++ b/boards/slstk3402a/Makefile.dep @@ -1,4 +1,5 @@ ifneq (,$(filter saul_default,$(USEMODULE))) + USEMODULE += efm32_coretemp USEMODULE += saul_gpio USEMODULE += si7021 endif diff --git a/boards/slstk3402a/include/board.h b/boards/slstk3402a/include/board.h index feb15b379c..c397502eb7 100644 --- a/boards/slstk3402a/include/board.h +++ b/boards/slstk3402a/include/board.h @@ -22,6 +22,7 @@ #include "cpu.h" #include "periph_conf.h" +#include "periph/adc.h" #include "periph/gpio.h" #include "periph/spi.h" @@ -86,6 +87,15 @@ extern "C" { #define LED1_TOGGLE gpio_toggle(LED1_PIN) /** @} */ +/** + * @name Core temperature sensor configuration + * + * Connection to the on-chip temperature sensor. + * @{ + */ +#define CORETEMP_ADC ADC_LINE(0) +/** @} */ + /** * @name Display configuration * diff --git a/boards/sltb001a/Makefile.dep b/boards/sltb001a/Makefile.dep index 24169dab9c..948e78f1bf 100644 --- a/boards/sltb001a/Makefile.dep +++ b/boards/sltb001a/Makefile.dep @@ -1,6 +1,7 @@ ifneq (,$(filter saul_default,$(USEMODULE))) USEMODULE += bmp280_i2c USEMODULE += ccs811 + USEMODULE += efm32_coretemp USEMODULE += saul_gpio USEMODULE += si7021 endif diff --git a/boards/sltb001a/include/board.h b/boards/sltb001a/include/board.h index 8f97d7325b..56b9ed969e 100644 --- a/boards/sltb001a/include/board.h +++ b/boards/sltb001a/include/board.h @@ -22,6 +22,7 @@ #include "cpu.h" #include "periph_conf.h" +#include "periph/adc.h" #include "periph/gpio.h" #include "periph/spi.h" @@ -76,6 +77,15 @@ extern "C" { #define LED1_TOGGLE gpio_toggle(LED1_PIN) /** @} */ +/** + * @name Core temperature sensor configuration + * + * Connection to the on-chip temperature sensor. + * @{ + */ +#define CORETEMP_ADC ADC_LINE(0) +/** @} */ + /** * @name Environmental sensors configuration * diff --git a/boards/slwstk6220a/Makefile.dep b/boards/slwstk6220a/Makefile.dep index eb037e2587..1208c3a05e 100644 --- a/boards/slwstk6220a/Makefile.dep +++ b/boards/slwstk6220a/Makefile.dep @@ -1,4 +1,5 @@ ifneq (,$(filter saul_default,$(USEMODULE))) + USEMODULE += efm32_coretemp USEMODULE += saul_gpio USEMODULE += si7021 endif diff --git a/boards/slwstk6220a/include/board.h b/boards/slwstk6220a/include/board.h index f8ca1231cd..59eb5ed339 100644 --- a/boards/slwstk6220a/include/board.h +++ b/boards/slwstk6220a/include/board.h @@ -22,6 +22,7 @@ #include "cpu.h" #include "periph_conf.h" +#include "periph/adc.h" #include "periph/gpio.h" #include "periph/spi.h" @@ -86,6 +87,15 @@ extern "C" { #define LED1_TOGGLE gpio_toggle(LED1_PIN) /** @} */ +/** + * @name Core temperature sensor configuration + * + * Connection to the on-chip temperature sensor. + * @{ + */ +#define CORETEMP_ADC ADC_LINE(0) +/** @} */ + /** * @name Display configuration * diff --git a/boards/stk3200/Makefile.dep b/boards/stk3200/Makefile.dep index 03dd13dcad..b38ada67a7 100644 --- a/boards/stk3200/Makefile.dep +++ b/boards/stk3200/Makefile.dep @@ -1,4 +1,5 @@ ifneq (,$(filter saul_default,$(USEMODULE))) + USEMODULE += efm32_coretemp USEMODULE += saul_gpio endif diff --git a/boards/stk3200/include/board.h b/boards/stk3200/include/board.h index a3cac098c8..28e85a0f1e 100644 --- a/boards/stk3200/include/board.h +++ b/boards/stk3200/include/board.h @@ -22,6 +22,7 @@ #include "cpu.h" #include "periph_conf.h" +#include "periph/adc.h" #include "periph/gpio.h" #include "periph/spi.h" @@ -79,6 +80,15 @@ extern "C" { #define LED1_TOGGLE gpio_toggle(LED1_PIN) /** @} */ +/** + * @name Core temperature sensor configuration + * + * Connection to the on-chip temperature sensor. + * @{ + */ +#define CORETEMP_ADC ADC_LINE(0) +/** @} */ + /** * @name Display configuration * diff --git a/boards/stk3600/Makefile.dep b/boards/stk3600/Makefile.dep index 2a588f2abd..7e4b072543 100644 --- a/boards/stk3600/Makefile.dep +++ b/boards/stk3600/Makefile.dep @@ -1,4 +1,5 @@ ifneq (,$(filter saul_default,$(USEMODULE))) + USEMODULE += efm32_coretemp USEMODULE += saul_gpio endif diff --git a/boards/stk3600/include/board.h b/boards/stk3600/include/board.h index 62ee8c254b..8c873cf7ec 100644 --- a/boards/stk3600/include/board.h +++ b/boards/stk3600/include/board.h @@ -22,6 +22,7 @@ #include "cpu.h" #include "periph_conf.h" +#include "periph/adc.h" #include "periph/gpio.h" #include "periph/spi.h" @@ -86,6 +87,15 @@ extern "C" { #define LED1_TOGGLE gpio_toggle(LED1_PIN) /** @} */ +/** + * @name Core temperature sensor configuration + * + * Connection to the on-chip temperature sensor. + * @{ + */ +#define CORETEMP_ADC ADC_LINE(0) +/** @} */ + /** * @brief Initialize the board (GPIO, sensors, clocks). */ diff --git a/boards/stk3700/Makefile.dep b/boards/stk3700/Makefile.dep index 2a588f2abd..7e4b072543 100644 --- a/boards/stk3700/Makefile.dep +++ b/boards/stk3700/Makefile.dep @@ -1,4 +1,5 @@ ifneq (,$(filter saul_default,$(USEMODULE))) + USEMODULE += efm32_coretemp USEMODULE += saul_gpio endif diff --git a/boards/stk3700/include/board.h b/boards/stk3700/include/board.h index a8efa2b173..9f0b3b9c69 100644 --- a/boards/stk3700/include/board.h +++ b/boards/stk3700/include/board.h @@ -22,6 +22,7 @@ #include "cpu.h" #include "periph_conf.h" +#include "periph/adc.h" #include "periph/gpio.h" #include "periph/spi.h" @@ -86,6 +87,15 @@ extern "C" { #define LED1_TOGGLE gpio_toggle(LED1_PIN) /** @} */ +/** + * @name Core temperature sensor configuration + * + * Connection to the on-chip temperature sensor. + * @{ + */ +#define CORETEMP_ADC ADC_LINE(0) +/** @} */ + /** * @brief Initialize the board (GPIO, sensors, clocks). */