Lines Matching full:odr
39 static int lsm6dso_odr_to_freq_val(uint16_t odr) in lsm6dso_odr_to_freq_val() argument
42 if (odr < ARRAY_SIZE(lsm6dso_odr_map)) { in lsm6dso_odr_to_freq_val()
43 return lsm6dso_odr_map[odr]; in lsm6dso_odr_to_freq_val()
119 static int lsm6dso_accel_set_odr_raw(const struct device *dev, uint8_t odr) in lsm6dso_accel_set_odr_raw() argument
125 if (lsm6dso_xl_data_rate_set(ctx, odr) < 0) { in lsm6dso_accel_set_odr_raw()
129 data->accel_freq = lsm6dso_odr_to_freq_val(odr); in lsm6dso_accel_set_odr_raw()
146 static int lsm6dso_gyro_set_odr_raw(const struct device *dev, uint8_t odr) in lsm6dso_gyro_set_odr_raw() argument
151 if (lsm6dso_gy_data_rate_set(ctx, odr) < 0) { in lsm6dso_gyro_set_odr_raw()
160 int odr; in lsm6dso_accel_odr_set() local
162 odr = lsm6dso_freq_to_odr_val(freq); in lsm6dso_accel_odr_set()
163 if (odr < 0) { in lsm6dso_accel_odr_set()
164 return odr; in lsm6dso_accel_odr_set()
167 if (lsm6dso_accel_set_odr_raw(dev, odr) < 0) { in lsm6dso_accel_odr_set()
216 int odr; in lsm6dso_gyro_odr_set() local
218 odr = lsm6dso_freq_to_odr_val(freq); in lsm6dso_gyro_odr_set()
219 if (odr < 0) { in lsm6dso_gyro_odr_set()
220 return odr; in lsm6dso_gyro_odr_set()
223 if (lsm6dso_gyro_set_odr_raw(dev, odr) < 0) { in lsm6dso_gyro_odr_set()
710 uint8_t odr, fs; in lsm6dso_init_chip() local
783 odr = cfg->accel_odr; in lsm6dso_init_chip()
784 LOG_DBG("accel odr is %d", odr); in lsm6dso_init_chip()
785 lsm6dso->accel_freq = lsm6dso_odr_to_freq_val(odr); in lsm6dso_init_chip()
786 if (lsm6dso_accel_set_odr_raw(dev, odr) < 0) { in lsm6dso_init_chip()
787 LOG_ERR("failed to set accelerometer odr %d", odr); in lsm6dso_init_chip()
811 odr = cfg->gyro_odr; in lsm6dso_init_chip()
812 LOG_DBG("gyro odr is %d", odr); in lsm6dso_init_chip()
813 lsm6dso->gyro_freq = lsm6dso_odr_to_freq_val(odr); in lsm6dso_init_chip()
814 if (lsm6dso_gyro_set_odr_raw(dev, odr) < 0) { in lsm6dso_init_chip()
815 LOG_ERR("failed to set gyroscope odr %d", odr); in lsm6dso_init_chip()