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

drivers/adcxx1c: use new driver params scheme

This commit is contained in:
Alexandre Abadie 2018-02-28 16:04:32 +01:00
parent 8a6bed72bd
commit adb848fbbf

View File

@ -56,14 +56,19 @@ extern "C" {
#define ADCXX1C_PARAM_HYSTERESIS (0)
#endif
#define ADCXX1C_PARAMS_DEFAULT { .i2c = ADCXX1C_PARAM_I2C, \
.addr = ADCXX1C_PARAM_ADDR, \
.bits = ADCXX1C_PARAM_BITS, \
.cycle = ADCXX1C_PARAM_CYCLE, \
.alert_pin = ADCXX1C_PARAM_ALERT_PIN, \
.low_limit = ADCXX1C_PARAM_LOW_LIMIT, \
#ifndef ADCXX1C_PARAMS
#define ADCXX1C_PARAMS { .i2c = ADCXX1C_PARAM_I2C, \
.addr = ADCXX1C_PARAM_ADDR, \
.bits = ADCXX1C_PARAM_BITS, \
.cycle = ADCXX1C_PARAM_CYCLE, \
.alert_pin = ADCXX1C_PARAM_ALERT_PIN, \
.low_limit = ADCXX1C_PARAM_LOW_LIMIT, \
.high_limit = ADCXX1C_PARAM_HIGH_LIMIT, \
.hysteresis = ADCXX1C_PARAM_HYSTERESIS }
#endif
#ifndef ADCXX1C_SAUL_INFO
#define ADCXX1C_SAUL_INFO { .name = "adcxx1c" }
#endif
/** @} */
/**
@ -71,11 +76,7 @@ extern "C" {
*/
static const adcxx1c_params_t adcxx1c_params[] =
{
#ifdef ADCXX1C_PARAMS_BOARD
ADCXX1C_PARAMS_BOARD,
#else
ADCXX1C_PARAMS_DEFAULT,
#endif
ADCXX1C_PARAMS
};
@ -84,9 +85,7 @@ static const adcxx1c_params_t adcxx1c_params[] =
*/
static const saul_reg_info_t adcxx1c_saul_info[] =
{
{
.name = "adcxx1c",
},
ADCXX1C_SAUL_INFO
};
#ifdef __cplusplus