Home
last modified time | relevance | path

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

/Zephyr-latest/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-latest/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-latest/drivers/sensor/st/iis2dh/
Diis2dh.c107 int64_t dval; in iis2dh_convert() local
111 dval = ((int64_t)raw_val * gain * SENSOR_G) / 1000000LL; in iis2dh_convert()
112 val->val1 = dval / 1000000LL; in iis2dh_convert()
113 val->val2 = dval % 1000000LL; in iis2dh_convert()
/Zephyr-latest/drivers/sensor/st/ism330dhcx/
Dism330dhcx.c402 int64_t dval; in ism330dhcx_accel_convert() local
406 dval = (int64_t)(raw_val) * sensitivity; in ism330dhcx_accel_convert()
407 sensor_ug_to_ms2(dval, val); in ism330dhcx_accel_convert()
450 int64_t dval; in ism330dhcx_gyro_convert() local
454 dval = (int64_t)(raw_val) * sensitivity / 10; in ism330dhcx_gyro_convert()
455 sensor_10udegrees_to_rad(dval, val); in ism330dhcx_gyro_convert()
510 double dval; in ism330dhcx_magn_convert() local
513 dval = (double)(raw_val * sensitivity); in ism330dhcx_magn_convert()
514 val->val1 = (int32_t)dval / 1000000; in ism330dhcx_magn_convert()
515 val->val2 = (int32_t)dval % 1000000; in ism330dhcx_magn_convert()
/Zephyr-latest/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-latest/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-latest/drivers/sensor/st/lsm6dso/
Dlsm6dso.c398 int64_t dval; in lsm6dso_accel_convert() local
402 dval = (int64_t)(raw_val) * sensitivity; in lsm6dso_accel_convert()
403 sensor_ug_to_ms2(dval, val); in lsm6dso_accel_convert()
445 int64_t dval; in lsm6dso_gyro_convert() local
449 dval = (int64_t)(raw_val) * sensitivity / 10; in lsm6dso_gyro_convert()
450 sensor_10udegrees_to_rad(dval, val); in lsm6dso_gyro_convert()
503 double dval; in lsm6dso_magn_convert() local
506 dval = (double)(raw_val * sensitivity); in lsm6dso_magn_convert()
507 val->val1 = (int32_t)dval / 1000000; in lsm6dso_magn_convert()
508 val->val2 = (int32_t)dval % 1000000; in lsm6dso_magn_convert()
/Zephyr-latest/drivers/sensor/st/lsm6dso16is/
Dlsm6dso16is.c424 int64_t dval; in lsm6dso16is_accel_convert() local
428 dval = (int64_t)(raw_val) * sensitivity; in lsm6dso16is_accel_convert()
429 sensor_ug_to_ms2(dval, val); in lsm6dso16is_accel_convert()
472 int64_t dval; in lsm6dso16is_gyro_convert() local
476 dval = (int64_t)(raw_val) * sensitivity / 10; in lsm6dso16is_gyro_convert()
477 sensor_10udegrees_to_rad(dval, val); in lsm6dso16is_gyro_convert()
536 double dval; in lsm6dso16is_magn_convert() local
539 dval = (double)(raw_val * sensitivity); in lsm6dso16is_magn_convert()
540 val->val1 = (int32_t)dval / 1000000; in lsm6dso16is_magn_convert()
541 val->val2 = (int32_t)dval % 1000000; in lsm6dso16is_magn_convert()
/Zephyr-latest/drivers/sensor/st/lis2dux12/
Dlis2dux12.c179 int64_t dval; in lis2dux12_convert() local
183 dval = ((int64_t)raw_val * gain * SENSOR_G) / 1000; in lis2dux12_convert()
184 val->val1 = dval / 1000000LL; in lis2dux12_convert()
185 val->val2 = dval % 1000000LL; in lis2dux12_convert()
/Zephyr-latest/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-latest/drivers/sensor/st/iis2iclx/
Diis2iclx.c279 int64_t dval; in iis2iclx_accel_convert() local
283 dval = (int64_t)(raw_val) * sensitivity; in iis2iclx_accel_convert()
284 sensor_ug_to_ms2(dval, val); in iis2iclx_accel_convert()
334 double dval; in iis2iclx_magn_convert() local
337 dval = (double)(raw_val * sensitivity); in iis2iclx_magn_convert()
338 val->val1 = (int32_t)dval / 1000000; in iis2iclx_magn_convert()
339 val->val2 = (int32_t)dval % 1000000; in iis2iclx_magn_convert()
/Zephyr-latest/drivers/sensor/st/lis2ds12/
Dlis2ds12.c216 int64_t dval; in lis2ds12_convert() local
220 dval = ((int64_t)raw_val * gain * SENSOR_G) / 1000; in lis2ds12_convert()
221 val->val1 = dval / 1000000LL; in lis2ds12_convert()
222 val->val2 = dval % 1000000LL; in lis2ds12_convert()
/Zephyr-latest/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-latest/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-latest/drivers/sensor/st/lsm6dsv16x/
Dlsm6dsv16x.c630 int64_t dval; in lsm6dsv16x_accel_convert() local
634 dval = (int64_t)(raw_val) * sensitivity; in lsm6dsv16x_accel_convert()
635 sensor_ug_to_ms2(dval, val); in lsm6dsv16x_accel_convert()
677 int64_t dval; in lsm6dsv16x_gyro_convert() local
681 dval = (int64_t)(raw_val) * sensitivity / 10; in lsm6dsv16x_gyro_convert()
682 sensor_10udegrees_to_rad(dval, val); in lsm6dsv16x_gyro_convert()
740 double dval; in lsm6dsv16x_magn_convert() local
743 dval = (double)(raw_val * sensitivity); in lsm6dsv16x_magn_convert()
744 val->val1 = (int32_t)dval / 1000000; in lsm6dsv16x_magn_convert()
745 val->val2 = (int32_t)dval % 1000000; in lsm6dsv16x_magn_convert()
/Zephyr-latest/drivers/sensor/st/iis2dlpc/
Diis2dlpc.c83 int64_t dval; in iis2dlpc_convert() local
87 dval = ((int64_t)raw_val * gain * SENSOR_G) / 1000000LL; in iis2dlpc_convert()
88 val->val1 = dval / 1000000LL; in iis2dlpc_convert()
89 val->val2 = dval % 1000000LL; in iis2dlpc_convert()
/Zephyr-latest/drivers/sensor/st/iis328dq/
Diis328dq.c108 int64_t dval; in iis328dq_convert() local
112 dval = ((int64_t)raw_val * gain * SENSOR_G) / 1000LL; in iis328dq_convert()
113 val->val1 = dval / 1000000LL; in iis328dq_convert()
114 val->val2 = dval % 1000000LL; in iis328dq_convert()
/Zephyr-latest/drivers/sensor/st/lis2dw12/
Dlis2dw12.c86 int64_t dval; in lis2dw12_convert() local
90 dval = ((int64_t)raw_val * gain * SENSOR_G) / 1000000LL; in lis2dw12_convert()
91 val->val1 = dval / 1000000LL; in lis2dw12_convert()
92 val->val2 = dval % 1000000LL; in lis2dw12_convert()