Lines Matching refs:fs
88 static int lis2du12_accel_set_fs_raw(const struct device *dev, uint8_t fs) in lis2du12_accel_set_fs_raw() argument
99 mode.fs = fs; in lis2du12_accel_set_fs_raw()
104 data->accel_fs = fs; in lis2du12_accel_set_fs_raw()
149 int fs; in lis2du12_accel_range_set() local
152 fs = lis2du12_accel_range_to_fs_val(range); in lis2du12_accel_range_set()
153 if (fs < 0) { in lis2du12_accel_range_set()
154 return fs; in lis2du12_accel_range_set()
157 if (lis2du12_accel_set_fs_raw(dev, fs) < 0) { in lis2du12_accel_range_set()
162 data->acc_gain = lis2du12_accel_fs_map[fs] * GAIN_UNIT_XL / 2; in lis2du12_accel_range_set()
208 md.fs = cfg->accel_range; in lis2du12_sample_fetch_accel()
322 uint8_t odr, fs; in lis2du12_init_chip() local
342 fs = cfg->accel_range; in lis2du12_init_chip()
343 LOG_DBG("accel range is %d", fs); in lis2du12_init_chip()
344 if (lis2du12_accel_set_fs_raw(dev, fs) < 0) { in lis2du12_init_chip()
345 LOG_ERR("failed to set accelerometer range %d", fs); in lis2du12_init_chip()
348 lis2du12->acc_gain = lis2du12_accel_fs_map[fs] * GAIN_UNIT_XL / 2; in lis2du12_init_chip()