Lines Matching full:odr
29 * Values of the different sampling frequencies of the accelerometer, indexed by the raw odr
35 * Value of the different sampling frequencies of the gyroscope, indexed by the raw odr value
125 static int lsm9ds1_accel_set_odr_raw(const struct device *dev, uint8_t odr) in lsm9ds1_accel_set_odr_raw() argument
139 ctrl_reg6_xl.odr_xl = odr; in lsm9ds1_accel_set_odr_raw()
146 data->accel_odr = odr; in lsm9ds1_accel_set_odr_raw()
151 static int lsm9ds1_gyro_set_odr_raw(const struct device *dev, uint8_t odr) in lsm9ds1_gyro_set_odr_raw() argument
165 ctrl_reg1.odr_g = odr; in lsm9ds1_gyro_set_odr_raw()
172 data->gyro_odr = odr; in lsm9ds1_gyro_set_odr_raw()
179 int odr; in lsm9ds1_gyro_odr_set() local
182 odr = lsm9ds1_gyro_freq_to_odr_val(freq); in lsm9ds1_gyro_odr_set()
184 if (odr == data->gyro_odr) { in lsm9ds1_gyro_odr_set()
188 LOG_INF("You are also changing the odr of the accelerometer"); in lsm9ds1_gyro_odr_set()
190 ret = lsm9ds1_gyro_set_odr_raw(dev, odr); in lsm9ds1_gyro_odr_set()
197 * When the gyroscope is on, the value of the accelerometer odr must be in lsm9ds1_gyro_odr_set()
201 ret = lsm9ds1_accel_set_odr_raw(dev, odr); in lsm9ds1_gyro_odr_set()
215 int odr, ret; in lsm9ds1_accel_odr_set() local
225 * we have to change the odr on both the accelerometer and the gyroscope in lsm9ds1_accel_odr_set()
229 odr = lsm9ds1_gyro_freq_to_odr_val(freq); in lsm9ds1_accel_odr_set()
231 if (odr == data->gyro_odr) { in lsm9ds1_accel_odr_set()
235 LOG_INF("You are also changing the odr of the gyroscope"); in lsm9ds1_accel_odr_set()
237 ret = lsm9ds1_accel_set_odr_raw(dev, odr); in lsm9ds1_accel_odr_set()
243 ret = lsm9ds1_gyro_set_odr_raw(dev, odr); in lsm9ds1_accel_odr_set()
249 /* The gyroscope is off, we have to change the odr of just the accelerometer */ in lsm9ds1_accel_odr_set()
252 odr = lsm9ds1_accel_freq_to_odr_val(freq); in lsm9ds1_accel_odr_set()
254 if (odr == data->accel_odr) { in lsm9ds1_accel_odr_set()
258 if (odr < 0) { in lsm9ds1_accel_odr_set()
259 return odr; in lsm9ds1_accel_odr_set()
262 ret = lsm9ds1_accel_set_odr_raw(dev, odr); in lsm9ds1_accel_odr_set()
595 LOG_ERR("failed to set IMU odr"); in lsm9ds1_init()