boards/pba-d-01-kw2x: adapted MMA8x5x configuaration

pr/spi.typo
Hauke Petersen 6 years ago
parent db24f5e140
commit b368179d6b

@ -3,6 +3,6 @@ ifneq (,$(filter netdev_default gnrc_netdev_default,$(USEMODULE)))
endif
ifneq (,$(filter saul_default,$(USEMODULE)))
USEMODULE += mma8652
USEMODULE += mma8x5x
USEMODULE += hdc1000
endif

@ -79,7 +79,7 @@ extern "C"
* @name Define the interface for the HDC1000 humidity sensor
* @{
*/
#define HDC1000_I2C (I2C_0)
#define HDC1000_I2C (I2C_DEV(0))
#define HDC1000_ADDR (0x43)
/** @} */
@ -87,7 +87,7 @@ extern "C"
* @name Define the interface for the MAG3110 magnetometer sensor
* @{
*/
#define MAG3110_I2C (I2C_0)
#define MAG3110_I2C (I2C_DEV(0))
#define MAG3110_ADDR (0x0E)
/** @} */
@ -95,7 +95,7 @@ extern "C"
* @name Define the interface for the MMA8652 tri-axis accelerometer sensor
* @{
*/
#define MMA8652_I2C (I2C_0)
#define MMA8652_I2C (I2C_DEV(0))
#define MMA8652_ADDR (0x1D)
/** @} */
@ -103,7 +103,7 @@ extern "C"
* @name Define the interface for the MPL3115A2 pressure sensor
* @{
*/
#define MPL3115A2_I2C (I2C_0)
#define MPL3115A2_I2C (I2C_DEV(0))
#define MPL3115A2_ADDR (0x60)
/** @} */
@ -111,7 +111,7 @@ extern "C"
* @name Define the interface for the TCS3772 light sensor
* @{
*/
#define TCS37727_I2C (I2C_0)
#define TCS37727_I2C (I2C_DEV(0))
#define TCS37727_ADDR (0x29)
/** @} */
@ -119,7 +119,7 @@ extern "C"
* @name Define the interface for the TMP006 IR-Termopile sensor
* @{
*/
#define TMP006_I2C (I2C_0)
#define TMP006_I2C (I2C_DEV(0))
#define TMP006_ADDR (0x41)
/** @} */

@ -1,58 +0,0 @@
/*
* Copyright (C) 2016 Freie Universität Berlin
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup boards_pba-d-01-kw2x
* @{
*
* @file
* @brief MMA8652 board specific configuration
*
* @author Cenk Gündoğan <mail@cgundogan.de>
*/
#ifndef MMA8652_PARAMS_H
#define MMA8652_PARAMS_H
#include "board.h"
#include "saul_reg.h"
#include "mma8652.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief MMA852 configuration
*/
static const mma8652_params_t mma8652_params[] =
{
{
.i2c = MMA8652_I2C,
.addr = MMA8652_ADDR,
.rate = MMA8652_DATARATE_DEFAULT,
.scale = MMA8652_FS_RANGE_DEFAULT,
},
};
/**
* @brief Additional meta information to keep in the SAUL registry
*/
static const saul_reg_info_t mma8652_saul_info[] =
{
{
.name = "mma8652",
},
};
#ifdef __cplusplus
}
#endif
#endif /* MMA8652_PARAMS_H */
/** @} */

@ -0,0 +1,61 @@
/*
* Copyright (C) 2016 Freie Universität Berlin
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup boards_pba-d-01-kw2x
* @{
*
* @file
* @brief MMA8x5x board specific configuration
*
* @author Cenk Gündoğan <mail@cgundogan.de>
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
*/
#ifndef MMA8X5X_PARAMS_H
#define MMA8X5X_PARAMS_H
#include "board.h"
#include "saul_reg.h"
#include "mma8x5x.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief MMA852 configuration
*/
static const mma8x5x_params_t mma8x5x_params[] =
{
{
.i2c = MMA8652_I2C,
.addr = MMA8652_ADDR,
.type = MMA8X5X_TYPE_MMA8652,
.rate = MMA8X5X_RATE_200HZ,
.range = MMA8X5X_RANGE_2G,
.offset = { 0, 0, 0 }
}
};
/**
* @brief Additional meta information to keep in the SAUL registry
*/
static const saul_reg_info_t mma8x5x_saul_info[] =
{
{
.name = "mma8652"
}
};
#ifdef __cplusplus
}
#endif
#endif /* MMA8X5X_PARAMS_H */
/** @} */
Loading…
Cancel
Save