Home
last modified time | relevance | path

Searched refs:dval (Results 1 – 20 of 20) sorted by relevance

/Zephyr-Core-3.7.0/drivers/sensor/seeed/grove/
Dlight_sensor.c65 double ldr_val, dval; in gls_channel_get() local
73 dval = 10000.0 / pow(ldr_val * 15.0, 4.0/3.0); in gls_channel_get()
75 val->val1 = (int32_t)dval; in gls_channel_get()
76 val->val2 = ((int32_t)(dval * 1000000)) % 1000000; in gls_channel_get()
Dtemperature_sensor.c64 double dval; in gts_channel_get() local
71 dval = (1 / (log((BIT(GROVE_RESOLUTION) - 1.0) in gts_channel_get()
77 val->val1 = (int32_t)dval; in gts_channel_get()
78 val->val2 = ((int32_t)(dval * 1000000)) % 1000000; in gts_channel_get()
/Zephyr-Core-3.7.0/drivers/sensor/st/lsm6ds0/
Dlsm6ds0.c235 double dval; in lsm6ds0_accel_convert() local
237 dval = (double)(raw_val) * (double)scale / 32767.0; in lsm6ds0_accel_convert()
238 val->val1 = (int32_t)dval; in lsm6ds0_accel_convert()
239 val->val2 = ((int32_t)(dval * 1000000)) % 1000000; in lsm6ds0_accel_convert()
292 double dval; in lsm6ds0_gyro_convert() local
294 dval = (double)(raw_val) * (double)numerator / 1000.0 * SENSOR_DEG2RAD_DOUBLE; in lsm6ds0_gyro_convert()
295 val->val1 = (int32_t)dval; in lsm6ds0_gyro_convert()
296 val->val2 = ((int32_t)(dval * 1000000)) % 1000000; in lsm6ds0_gyro_convert()
/Zephyr-Core-3.7.0/drivers/sensor/st/iis2dh/
Diis2dh.c108 int64_t dval; in iis2dh_convert() local
112 dval = ((int64_t)raw_val * gain * SENSOR_G) / 1000000LL; in iis2dh_convert()
113 val->val1 = dval / 1000000LL; in iis2dh_convert()
114 val->val2 = dval % 1000000LL; in iis2dh_convert()
/Zephyr-Core-3.7.0/drivers/sensor/st/ism330dhcx/
Dism330dhcx.c403 int64_t dval; in ism330dhcx_accel_convert() local
407 dval = (int64_t)(raw_val) * sensitivity; in ism330dhcx_accel_convert()
408 sensor_ug_to_ms2(dval, val); in ism330dhcx_accel_convert()
451 int64_t dval; in ism330dhcx_gyro_convert() local
455 dval = (int64_t)(raw_val) * sensitivity / 10; in ism330dhcx_gyro_convert()
456 sensor_10udegrees_to_rad(dval, val); in ism330dhcx_gyro_convert()
511 double dval; in ism330dhcx_magn_convert() local
514 dval = (double)(raw_val * sensitivity); in ism330dhcx_magn_convert()
515 val->val1 = (int32_t)dval / 1000000; in ism330dhcx_magn_convert()
516 val->val2 = (int32_t)dval % 1000000; in ism330dhcx_magn_convert()
/Zephyr-Core-3.7.0/drivers/sensor/st/lsm6dsl/
Dlsm6dsl.c475 int64_t dval; in lsm6dsl_accel_convert() local
479 dval = (int64_t)raw_val * sensitivity; in lsm6dsl_accel_convert()
480 sensor_ug_to_ms2(dval, val); in lsm6dsl_accel_convert()
523 int64_t dval; in lsm6dsl_gyro_convert() local
527 dval = (int64_t)raw_val * sensitivity / 10; in lsm6dsl_gyro_convert()
528 sensor_10udegrees_to_rad(dval, val); in lsm6dsl_gyro_convert()
580 double dval; in lsm6dsl_magn_convert() local
583 dval = (double)(raw_val * sensitivity); in lsm6dsl_magn_convert()
584 val->val1 = (int32_t)dval / 1000000; in lsm6dsl_magn_convert()
585 val->val2 = (int32_t)dval % 1000000; in lsm6dsl_magn_convert()
/Zephyr-Core-3.7.0/drivers/sensor/st/lsm9ds0_mfd/
Dlsm9ds0_mfd.c372 double dval; in lsm9ds0_mfd_convert_accel() local
374 dval = (double)(raw_val) * (double)scale; in lsm9ds0_mfd_convert_accel()
375 val->val1 = (int32_t)dval; in lsm9ds0_mfd_convert_accel()
376 val->val2 = ((int32_t)(dval * 1000000)) % 1000000; in lsm9ds0_mfd_convert_accel()
458 double dval; in lsm9ds0_mfd_convert_magn() local
460 dval = (double)(raw_val) * (double)scale; in lsm9ds0_mfd_convert_magn()
461 val->val1 = (int32_t)dval; in lsm9ds0_mfd_convert_magn()
462 val->val2 = ((int32_t)(dval * 1000000)) % 1000000; in lsm9ds0_mfd_convert_magn()
/Zephyr-Core-3.7.0/drivers/sensor/st/lsm6dso/
Dlsm6dso.c401 int64_t dval; in lsm6dso_accel_convert() local
405 dval = (int64_t)(raw_val) * sensitivity; in lsm6dso_accel_convert()
406 sensor_ug_to_ms2(dval, val); in lsm6dso_accel_convert()
448 int64_t dval; in lsm6dso_gyro_convert() local
452 dval = (int64_t)(raw_val) * sensitivity / 10; in lsm6dso_gyro_convert()
453 sensor_10udegrees_to_rad(dval, val); in lsm6dso_gyro_convert()
506 double dval; in lsm6dso_magn_convert() local
509 dval = (double)(raw_val * sensitivity); in lsm6dso_magn_convert()
510 val->val1 = (int32_t)dval / 1000000; in lsm6dso_magn_convert()
511 val->val2 = (int32_t)dval % 1000000; in lsm6dso_magn_convert()
/Zephyr-Core-3.7.0/drivers/sensor/st/lsm6dsv16x/
Dlsm6dsv16x.c472 int64_t dval; in lsm6dsv16x_accel_convert() local
476 dval = (int64_t)(raw_val) * sensitivity; in lsm6dsv16x_accel_convert()
477 sensor_ug_to_ms2(dval, val); in lsm6dsv16x_accel_convert()
519 int64_t dval; in lsm6dsv16x_gyro_convert() local
523 dval = (int64_t)(raw_val) * sensitivity / 10; in lsm6dsv16x_gyro_convert()
524 sensor_10udegrees_to_rad(dval, val); in lsm6dsv16x_gyro_convert()
583 double dval; in lsm6dsv16x_magn_convert() local
586 dval = (double)(raw_val * sensitivity); in lsm6dsv16x_magn_convert()
587 val->val1 = (int32_t)dval / 1000000; in lsm6dsv16x_magn_convert()
588 val->val2 = (int32_t)dval % 1000000; in lsm6dsv16x_magn_convert()
/Zephyr-Core-3.7.0/drivers/sensor/st/lsm6dso16is/
Dlsm6dso16is.c425 int64_t dval; in lsm6dso16is_accel_convert() local
429 dval = (int64_t)(raw_val) * sensitivity; in lsm6dso16is_accel_convert()
430 sensor_ug_to_ms2(dval, val); in lsm6dso16is_accel_convert()
473 int64_t dval; in lsm6dso16is_gyro_convert() local
477 dval = (int64_t)(raw_val) * sensitivity / 10; in lsm6dso16is_gyro_convert()
478 sensor_10udegrees_to_rad(dval, val); in lsm6dso16is_gyro_convert()
537 double dval; in lsm6dso16is_magn_convert() local
540 dval = (double)(raw_val * sensitivity); in lsm6dso16is_magn_convert()
541 val->val1 = (int32_t)dval / 1000000; in lsm6dso16is_magn_convert()
542 val->val2 = (int32_t)dval % 1000000; in lsm6dso16is_magn_convert()
/Zephyr-Core-3.7.0/drivers/sensor/st/lsm9ds0_gyro/
Dlsm9ds0_gyro.c156 double dval; in lsm9ds0_gyro_convert() local
158 dval = (double)(raw_val) * (double)numerator / 1000.0 * DEG2RAD; in lsm9ds0_gyro_convert()
159 val->val1 = (int32_t)dval; in lsm9ds0_gyro_convert()
160 val->val2 = ((int32_t)(dval * 1000000)) % 1000000; in lsm9ds0_gyro_convert()
/Zephyr-Core-3.7.0/drivers/sensor/st/iis2iclx/
Diis2iclx.c280 int64_t dval; in iis2iclx_accel_convert() local
284 dval = (int64_t)(raw_val) * sensitivity; in iis2iclx_accel_convert()
285 sensor_ug_to_ms2(dval, val); in iis2iclx_accel_convert()
335 double dval; in iis2iclx_magn_convert() local
338 dval = (double)(raw_val * sensitivity); in iis2iclx_magn_convert()
339 val->val1 = (int32_t)dval / 1000000; in iis2iclx_magn_convert()
340 val->val2 = (int32_t)dval % 1000000; in iis2iclx_magn_convert()
/Zephyr-Core-3.7.0/drivers/sensor/st/lis2ds12/
Dlis2ds12.c217 int64_t dval; in lis2ds12_convert() local
221 dval = ((int64_t)raw_val * gain * SENSOR_G) / 1000; in lis2ds12_convert()
222 val->val1 = dval / 1000000LL; in lis2ds12_convert()
223 val->val2 = dval % 1000000LL; in lis2ds12_convert()
/Zephyr-Core-3.7.0/drivers/sensor/st/lis2de12/
Dlis2de12.c220 int64_t dval; in lis2de12_accel_convert() local
224 dval = (int64_t)(raw_val / 256) * sensitivity * SENSOR_G_DOUBLE; in lis2de12_accel_convert()
225 val->val1 = (int32_t)(dval / 1000000); in lis2de12_accel_convert()
226 val->val2 = (int32_t)(dval % 1000000); in lis2de12_accel_convert()
/Zephyr-Core-3.7.0/drivers/sensor/st/lis2du12/
Dlis2du12.c241 int64_t dval; in lis2du12_accel_convert() local
245 dval = (int64_t)(raw_val) * sensitivity * SENSOR_G_DOUBLE; in lis2du12_accel_convert()
246 val->val1 = (int32_t)(dval / 1000000); in lis2du12_accel_convert()
247 val->val2 = (int32_t)(dval % 1000000); in lis2du12_accel_convert()
/Zephyr-Core-3.7.0/drivers/sensor/wsen/wsen_itds/
Ditds.c266 int64_t dval; in itds_accl_channel_get() local
270 dval = (int64_t)((ddata->samples[i] * ddata->scale * SENSOR_G) / in itds_accl_channel_get()
272 val->val1 = (int32_t)(dval / 1000000); in itds_accl_channel_get()
273 val->val2 = (int32_t)(dval % 1000000); in itds_accl_channel_get()
/Zephyr-Core-3.7.0/drivers/sensor/st/lis2dux12/
Dlis2dux12.c256 int64_t dval; in lis2dux12_convert() local
260 dval = ((int64_t)raw_val * gain * SENSOR_G) / 1000; in lis2dux12_convert()
261 val->val1 = dval / 1000000LL; in lis2dux12_convert()
262 val->val2 = dval % 1000000LL; in lis2dux12_convert()
/Zephyr-Core-3.7.0/drivers/sensor/st/iis328dq/
Diis328dq.c111 int64_t dval; in iis328dq_convert() local
115 dval = ((int64_t)raw_val * gain * SENSOR_G) / 1000LL; in iis328dq_convert()
116 val->val1 = dval / 1000000LL; in iis328dq_convert()
117 val->val2 = dval % 1000000LL; in iis328dq_convert()
/Zephyr-Core-3.7.0/drivers/sensor/st/iis2dlpc/
Diis2dlpc.c84 int64_t dval; in iis2dlpc_convert() local
88 dval = ((int64_t)raw_val * gain * SENSOR_G) / 1000000LL; in iis2dlpc_convert()
89 val->val1 = dval / 1000000LL; in iis2dlpc_convert()
90 val->val2 = dval % 1000000LL; in iis2dlpc_convert()
/Zephyr-Core-3.7.0/drivers/sensor/st/lis2dw12/
Dlis2dw12.c87 int64_t dval; in lis2dw12_convert() local
91 dval = ((int64_t)raw_val * gain * SENSOR_G) / 1000000LL; in lis2dw12_convert()
92 val->val1 = dval / 1000000LL; in lis2dw12_convert()
93 val->val2 = dval % 1000000LL; in lis2dw12_convert()