Merge pull request #8684 from aabadie/pr/drivers/params/mma8x5x
drivers/mm8x5x: apply unified params definition scheme
This commit is contained in:
commit
d7e7c68485
@ -58,6 +58,9 @@ extern "C" {
|
||||
.range = MMA8X5X_PARAM_RANGE, \
|
||||
.offset = MMA8X5X_PARAM_OFFSET }
|
||||
#endif
|
||||
#ifndef MMA8X5X_SAUL_INFO
|
||||
#define MMA8X5X_SAUL_INFO { .name = "mma8652" }
|
||||
#endif
|
||||
/**@}*/
|
||||
|
||||
/**
|
||||
@ -73,9 +76,7 @@ static const mma8x5x_params_t mma8x5x_params[] =
|
||||
*/
|
||||
static const saul_reg_info_t mma8x5x_saul_info[] =
|
||||
{
|
||||
{
|
||||
.name = "mma8652"
|
||||
}
|
||||
MMA8X5X_SAUL_INFO
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@ -42,15 +42,20 @@ static mma8x5x_t mma8x5x_devs[MMA8X5X_NUM];
|
||||
*/
|
||||
static saul_reg_t saul_entries[MMA8X5X_NUM];
|
||||
|
||||
/**
|
||||
* @brief Define the number of saul info
|
||||
*/
|
||||
#define MMA8X5X_INFO_NUM (sizeof(mma8x5x_saul_info) / sizeof(mma8x5x_saul_info[0]))
|
||||
|
||||
/**
|
||||
* @brief Reference the driver struct
|
||||
* @{
|
||||
*/
|
||||
extern saul_driver_t mma8x5x_saul_driver;
|
||||
/** @} */
|
||||
|
||||
void auto_init_mma8x5x(void)
|
||||
{
|
||||
assert(MMA8X5X_NUM == MMA8X5X_INFO_NUM);
|
||||
|
||||
for (unsigned i = 0; i < MMA8X5X_NUM; i++) {
|
||||
LOG_DEBUG("[auto_init_saul] initializing mma8x5x #%u\n", i);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user