1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 14:33:52 +01:00

drivers/mpl3115a2: use new driver params scheme

This commit is contained in:
Alexandre Abadie 2018-02-28 17:13:46 +01:00
parent 2e066e8693
commit deb0350d46

View File

@ -44,11 +44,14 @@ extern "C" {
#define MPL3115A2_PARAM_RATIO MPL3115A2_OS_RATIO_DEFAULT
#endif
#ifndef MPL3115A2_PARAMS_DEFAULT
#define MPL3115A2_PARAMS_DEFAULT { .i2c = MPL3115A2_PARAM_I2C, \
#ifndef MPL3115A2_PARAMS
#define MPL3115A2_PARAMS { .i2c = MPL3115A2_PARAM_I2C, \
.addr = MPL3115A2_PARAM_ADDR, \
.ratio = MPL3115A2_PARAM_RATIO }
#endif
#ifndef MPL3115A2_SAUL_INFO
#define MPL3115A2_SAUL_INFO { .name = "mpl3115a2" }
#endif
/**@}*/
/**
@ -56,12 +59,7 @@ extern "C" {
*/
static const mpl3115a2_params_t mpl3115a2_params[] =
{
#ifdef MPL3115A2_PARAMS_CUSTOM
MPL3115A2_PARAMS_CUSTOM
#else
MPL3115A2_PARAMS_DEFAULT
#endif
MPL3115A2_PARAMS
};
/**
@ -69,7 +67,7 @@ static const mpl3115a2_params_t mpl3115a2_params[] =
*/
static const saul_reg_info_t mpl3115a2_saul_info[] =
{
{ .name = "mpl3115a2" },
MPL3115A2_SAUL_INFO
};
#ifdef __cplusplus