diff --git a/drivers/lsm6dsl/lsm6dsl_saul.c b/drivers/lsm6dsl/lsm6dsl_saul.c index 0894cc1964..a1476e9b07 100644 --- a/drivers/lsm6dsl/lsm6dsl_saul.c +++ b/drivers/lsm6dsl/lsm6dsl_saul.c @@ -25,7 +25,7 @@ static int read_acc(const void *dev, phydat_t *res) { - int ret = lsm6dsl_read_acc((const lsm6dsl_t *)dev, (lsm6dsl_3d_data_t *)res); + int ret = lsm6dsl_read_acc((const lsm6dsl_t *)dev, (lsm6dsl_3d_data_t *)res->val); if (ret < 0) { return -ECANCELED; } @@ -38,7 +38,7 @@ static int read_acc(const void *dev, phydat_t *res) static int read_gyro(const void *dev, phydat_t *res) { - int ret = lsm6dsl_read_gyro((const lsm6dsl_t *)dev, (lsm6dsl_3d_data_t *)res); + int ret = lsm6dsl_read_gyro((const lsm6dsl_t *)dev, (lsm6dsl_3d_data_t *)res->val); if (ret < 0) { return -ECANCELED; } @@ -51,7 +51,7 @@ static int read_gyro(const void *dev, phydat_t *res) static int read_temp(const void *dev, phydat_t *res) { - if (lsm6dsl_read_temp((const lsm6dsl_t *)dev, (int16_t *)&res[0]) < 0) { + if (lsm6dsl_read_temp((const lsm6dsl_t *)dev, &res->val[0]) < 0) { return -ECANCELED; } res->scale = -2;