From 1e3e701bb131e43685339b9d041f2aca715cff62 Mon Sep 17 00:00:00 2001 From: Caio Date: Sun, 13 Oct 2024 16:42:59 -0400 Subject: [PATCH] #162-fixed param --- general/src/lsm6dso.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/general/src/lsm6dso.c b/general/src/lsm6dso.c index 43df6c7..6db0ab6 100644 --- a/general/src/lsm6dso.c +++ b/general/src/lsm6dso.c @@ -78,7 +78,7 @@ int lsm6dso_set_accel_cfg(lsm6dso_t *imu, int8_t odr_sel, int8_t fs_sel, (((odr_sel << 4) | (fs_sel << 2) | (lp_f2_enable << 1)) << 1); imu->accel_config = config; - return lsm6dso_write_reg(imu, imu->accel_config, + return lsm6dso_write_reg(imu, &imu->accel_config, LSM6DSO_REG_ACCEL_CTRL); } @@ -89,7 +89,7 @@ int lsm6dso_set_gyro_cfg(lsm6dso_t *imu, int8_t odr_sel, int8_t fs_sel, (((odr_sel << 4) | (fs_sel << 2) | (fs_125 << 1)) << 1); imu->gyro_config = config; - return lsm6dso_write_reg(imu, imu->gyro_config, LSM6DSO_REG_GYRO_CTRL); + return lsm6dso_write_reg(imu, &imu->gyro_config, LSM6DSO_REG_GYRO_CTRL); } int lsm6dso_init(lsm6dso_t *imu, I2C_Read read_func, I2C_Write write_func)