Lines Matching +full:2 +full:fs

53 static const uint16_t ism330dhcx_accel_fs_map[] = {2, 16, 4, 8};
54 static const uint16_t ism330dhcx_accel_fs_sens[] = {1, 8, 2, 4};
75 * ISM330DHCX_125dps = 2,
89 2, 32, 1, 0, 4,
121 static int ism330dhcx_accel_set_fs_raw(const struct device *dev, uint8_t fs) in ism330dhcx_accel_set_fs_raw() argument
125 if (ism330dhcx_xl_full_scale_set(data->ctx, fs) < 0) { in ism330dhcx_accel_set_fs_raw()
129 data->accel_fs = fs; in ism330dhcx_accel_set_fs_raw()
147 static int ism330dhcx_gyro_set_fs_raw(const struct device *dev, uint8_t fs) in ism330dhcx_gyro_set_fs_raw() argument
151 if (ism330dhcx_gy_full_scale_set(data->ctx, fs) < 0) { in ism330dhcx_gyro_set_fs_raw()
188 int fs; in ism330dhcx_accel_range_set() local
191 fs = ism330dhcx_accel_range_to_fs_val(range); in ism330dhcx_accel_range_set()
192 if (fs < 0) { in ism330dhcx_accel_range_set()
193 return fs; in ism330dhcx_accel_range_set()
196 if (ism330dhcx_accel_set_fs_raw(dev, fs) < 0) { in ism330dhcx_accel_range_set()
201 data->acc_gain = (ism330dhcx_accel_fs_sens[fs] * GAIN_UNIT_XL); in ism330dhcx_accel_range_set()
242 int fs; in ism330dhcx_gyro_range_set() local
245 fs = ism330dhcx_gyro_range_to_fs_val(range); in ism330dhcx_gyro_range_set()
246 if (fs < 0) { in ism330dhcx_gyro_range_set()
247 return fs; in ism330dhcx_gyro_range_set()
250 if (ism330dhcx_gyro_set_fs_raw(dev, fs) < 0) { in ism330dhcx_gyro_range_set()
255 data->gyro_gain = (ism330dhcx_gyro_fs_sens[fs] * GAIN_UNIT_G); in ism330dhcx_gyro_range_set()
313 data->acc[2] = buf[2]; in ism330dhcx_sample_fetch_accel()
330 data->gyro[2] = buf[2]; in ism330dhcx_sample_fetch_gyro()
405 /* Convert to m/s^2 */ in ism330dhcx_accel_convert()
425 ism330dhcx_accel_convert(val, data->acc[2], sensitivity); in ism330dhcx_accel_get_channel()
472 ism330dhcx_gyro_convert(val, data->gyro[2], sensitivity); in ism330dhcx_gyro_get_channel()
534 sample[1] = (int16_t)(data->ext_data[idx][2] | in ism330dhcx_magn_get_channel()
536 sample[2] = (int16_t)(data->ext_data[idx][4] | in ism330dhcx_magn_get_channel()
547 ism330dhcx_magn_convert(val, sample[2], data->magn_gain); in ism330dhcx_magn_get_channel()
552 ism330dhcx_magn_convert(val + 2, sample[2], data->magn_gain); in ism330dhcx_magn_get_channel()
601 (data->ext_data[idx][2] << 16)); in ism330dhcx_press_convert()