1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 05:12:57 +01:00

Merge pull request #8794 from basilfx/feature/efm32_fix_style

boards: efm32: adapt pr feedback for other boards
This commit is contained in:
Alexandre Abadie 2018-03-17 10:39:33 +01:00 committed by GitHub
commit 2a594b644b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 25 additions and 35 deletions

View File

@ -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)
{

View File

@ -1,5 +1,5 @@
ifneq (,$(filter saul_default,$(USEMODULE)))
USEMODULE += saul_gpio
USEMODULE += saul_gpio
endif
include $(RIOTCPU)/efm32/Makefile.dep

View File

@ -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

View File

@ -22,7 +22,6 @@
#define BOARD_H
#include "cpu.h"
#include "periph_conf.h"
#include "periph/gpio.h"
#include "periph/spi.h"

View File

@ -20,9 +20,7 @@
#define PERIPH_CONF_H
#include "cpu.h"
#include "periph_cpu.h"
#include "em_cmu.h"
#ifdef __cplusplus

View File

@ -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);

View File

@ -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

View File

@ -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

View File

@ -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 */
@ -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) |

View File

@ -23,7 +23,6 @@
#define BOARD_H
#include "cpu.h"
#include "periph_conf.h"
#include "periph/gpio.h"
#include "periph/spi.h"
@ -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
@ -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

View File

@ -21,9 +21,7 @@
#define PERIPH_CONF_H
#include "cpu.h"
#include "periph_cpu.h"
#include "em_cmu.h"
#ifdef __cplusplus

View File

@ -1,5 +1,5 @@
ifneq (,$(filter saul_default,$(USEMODULE)))
USEMODULE += saul_gpio
USEMODULE += saul_gpio
endif
# include board common dependencies

View File

@ -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

View File

@ -23,7 +23,6 @@
#define BOARD_H
#include "cpu.h"
#include "periph_conf.h"
#include "periph/gpio.h"
#include "periph/spi.h"

View File

@ -21,9 +21,7 @@
#define PERIPH_CONF_H
#include "cpu.h"
#include "periph_cpu.h"
#include "em_cmu.h"
#ifdef __cplusplus

View File

@ -1,5 +1,5 @@
ifneq (,$(filter saul_default,$(USEMODULE)))
USEMODULE += saul_gpio
USEMODULE += saul_gpio
endif
# include board common dependencies

View File

@ -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

View File

@ -23,7 +23,6 @@
#define BOARD_H
#include "cpu.h"
#include "periph_conf.h"
#include "periph/gpio.h"
#include "periph/spi.h"

View File

@ -21,9 +21,7 @@
#define PERIPH_CONF_H
#include "cpu.h"
#include "periph_cpu.h"
#include "em_cmu.h"
#ifdef __cplusplus