Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boards: efm32: adapt pr feedback for other boards #8794

Merged
merged 5 commits into from
Mar 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions boards/common/silabs/board_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,15 @@

#include "board_common.h"

#ifdef MODULE_SILABS_AEM
#include "aem.h"
#endif
#ifdef MODULE_SILABS_BC
#include "bc.h"
#endif
#ifdef MODULE_SILABS_PIC
#include "pic.h"
#endif

void board_common_init(void)
{
Expand Down
2 changes: 1 addition & 1 deletion boards/ikea-tradfri/Makefile.dep
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ifneq (,$(filter saul_default,$(USEMODULE)))
USEMODULE += saul_gpio
USEMODULE += saul_gpio
endif

include $(RIOTCPU)/efm32/Makefile.dep
2 changes: 1 addition & 1 deletion boards/ikea-tradfri/Makefile.features
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ FEATURES_PROVIDED += periph_uart
# The board MPU family (used for grouping by the CI system)
FEATURES_MCU_GROUP = cortex_m4_2

include $(RIOTCPU)/efm32/Makefile.features
-include $(RIOTCPU)/efm32/Makefile.features
1 change: 0 additions & 1 deletion boards/ikea-tradfri/include/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#define BOARD_H

#include "cpu.h"

#include "periph_conf.h"
#include "periph/gpio.h"
#include "periph/spi.h"
Expand Down
2 changes: 0 additions & 2 deletions boards/ikea-tradfri/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@
#define PERIPH_CONF_H

#include "cpu.h"

#include "periph_cpu.h"

#include "em_cmu.h"

#ifdef __cplusplus
Expand Down
2 changes: 1 addition & 1 deletion boards/slstk3401a/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ void board_init(void)
/* perform common board initialization */
board_common_init();

#ifdef MODULE_SI70XX
#ifdef MODULE_SI7021
/* initialize the Si7021 sensor */
gpio_init(SI7021_EN_PIN, GPIO_OUT);
gpio_set(SI7021_EN_PIN);
Expand Down
6 changes: 3 additions & 3 deletions boards/sltb001a/Makefile.dep
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ifneq (,$(filter saul_default,$(USEMODULE)))
USEMODULE += saul_gpio
USEMODULE += bmp280
USEMODULE += si7021
USEMODULE += saul_gpio
USEMODULE += bmp280
USEMODULE += si7021
endif

# include board common dependencies
Expand Down
2 changes: 1 addition & 1 deletion boards/sltb001a/Makefile.features
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ FEATURES_PROVIDED += periph_uart
# The board MPU family (used for grouping by the CI system)
FEATURES_MCU_GROUP = cortex_m4_2

include $(RIOTCPU)/efm32/Makefile.features
-include $(RIOTCPU)/efm32/Makefile.features
14 changes: 8 additions & 6 deletions boards/sltb001a/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@

#include "board.h"
#include "board_common.h"
#include "pic.h"

#include "periph/gpio.h"

#ifdef MODULE_SILABS_PIC
#include "pic.h"
#endif

void board_init(void)
{
/* initialize the CPU */
Expand All @@ -34,23 +36,23 @@ void board_init(void)
board_common_init();

#ifdef MODULE_SILABS_PIC
/* enable the CCS811 air quality/gas sensor */
#if CCS811_ENABLED
/* enable the CCS811 air quality/gas sensor */
pic_write(CCS811_PIC_ADDR, (1 << CCS811_PIC_EN_BIT) | (1 << CCS811_PIC_WAKE_BIT));
#endif

/* enable the IMU sensor */
#if ICM_20648_ENABLED
/* enable the IMU sensor */
pic_write(ICM20648_PIC_ADDR, 1 << ICM20648_PIC_EN_BIT);
#endif

#if defined(MODULE_BMP280) || defined(MODULE_SI7021) || SI1133_ENABLED || SI7210A_ENABLED
/* enable the environmental sensors */
#if BMP280_ENABLED || SI1133_ENABLED || SI7021_ENABLED || SI7210A_ENABLED
pic_write(ENV_SENSE_PIC_ADDR, 1 << ENV_SENSE_PIC_BIT);
#endif

/* enable the RGB leds */
#if RGB_LED1_ENABLED || RGB_LED2_ENABLED || RGB_LED3_ENABLED || RGB_LED4_ENABLED
/* enable the RGB leds */
pic_write(RGB_LED_ADDR,
(1 << RGB_LED_EN_BIT) |
(RGB_LED1_ENABLED << RGB_LED1_EN_BIT) |
Expand Down
7 changes: 0 additions & 7 deletions boards/sltb001a/include/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#define BOARD_H

#include "cpu.h"

#include "periph_conf.h"
#include "periph/gpio.h"
#include "periph/spi.h"
Expand Down Expand Up @@ -86,9 +85,6 @@ extern "C" {
* Connection to the on-board pressure sensor (BMP280).
* @{
*/
#ifndef BMP280_ENABLED
#define BMP280_ENABLED (1)
#endif
#define BMP280_I2C I2C_DEV(0)

#define BMX280_PARAM_I2C_DEV BMP280_I2C
Expand Down Expand Up @@ -178,9 +174,6 @@ extern "C" {
* Connection to the on-board temperature/humidity sensor (Si7021).
* @{
*/
#ifndef SI7021_ENABLED
#define SI7021_ENABLED (1)
#endif
#define SI7021_I2C I2C_DEV(0)

#define SI70XX_PARAM_I2C_DEV SI7021_I2C
Expand Down
2 changes: 0 additions & 2 deletions boards/sltb001a/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
#define PERIPH_CONF_H

#include "cpu.h"

#include "periph_cpu.h"

#include "em_cmu.h"

#ifdef __cplusplus
Expand Down
2 changes: 1 addition & 1 deletion boards/stk3600/Makefile.dep
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ifneq (,$(filter saul_default,$(USEMODULE)))
USEMODULE += saul_gpio
USEMODULE += saul_gpio
endif

# include board common dependencies
Expand Down
2 changes: 1 addition & 1 deletion boards/stk3600/Makefile.features
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ FEATURES_PROVIDED += periph_uart
# The board MPU family (used for grouping by the CI system)
FEATURES_MCU_GROUP = cortex_m3_2

include $(RIOTCPU)/efm32/Makefile.features
-include $(RIOTCPU)/efm32/Makefile.features
1 change: 0 additions & 1 deletion boards/stk3600/include/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#define BOARD_H

#include "cpu.h"

#include "periph_conf.h"
#include "periph/gpio.h"
#include "periph/spi.h"
Expand Down
2 changes: 0 additions & 2 deletions boards/stk3600/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
#define PERIPH_CONF_H

#include "cpu.h"

#include "periph_cpu.h"

#include "em_cmu.h"

#ifdef __cplusplus
Expand Down
2 changes: 1 addition & 1 deletion boards/stk3700/Makefile.dep
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ifneq (,$(filter saul_default,$(USEMODULE)))
USEMODULE += saul_gpio
USEMODULE += saul_gpio
endif

# include board common dependencies
Expand Down
2 changes: 1 addition & 1 deletion boards/stk3700/Makefile.features
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ FEATURES_PROVIDED += periph_uart
# The board MPU family (used for grouping by the CI system)
FEATURES_MCU_GROUP = cortex_m3_2

include $(RIOTCPU)/efm32/Makefile.features
-include $(RIOTCPU)/efm32/Makefile.features
1 change: 0 additions & 1 deletion boards/stk3700/include/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#define BOARD_H

#include "cpu.h"

#include "periph_conf.h"
#include "periph/gpio.h"
#include "periph/spi.h"
Expand Down
2 changes: 0 additions & 2 deletions boards/stk3700/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
#define PERIPH_CONF_H

#include "cpu.h"

#include "periph_cpu.h"

#include "em_cmu.h"

#ifdef __cplusplus
Expand Down