Home
last modified time | relevance | path

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

/Zephyr-Core-3.5.0/drivers/sensor/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.5.0/drivers/sensor/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.5.0/drivers/sensor/lsm6dsl/
Dlsm6dsl.c470 double dval; in lsm6dsl_accel_convert() local
474 dval = (double)(raw_val) * (double)sensitivity * SENSOR_G_DOUBLE / 1000; in lsm6dsl_accel_convert()
475 val->val1 = (int32_t)dval; in lsm6dsl_accel_convert()
476 val->val2 = (((int32_t)(dval * 1000)) % 1000) * 1000; in lsm6dsl_accel_convert()
520 double dval; in lsm6dsl_gyro_convert() local
524 dval = (double)(raw_val * (double)sensitivity * SENSOR_DEG2RAD_DOUBLE / 1000); in lsm6dsl_gyro_convert()
525 val->val1 = (int32_t)dval; in lsm6dsl_gyro_convert()
526 val->val2 = (((int32_t)(dval * 1000)) % 1000) * 1000; in lsm6dsl_gyro_convert()
578 double dval; in lsm6dsl_magn_convert() local
581 dval = (double)(raw_val * sensitivity); in lsm6dsl_magn_convert()
[all …]
/Zephyr-Core-3.5.0/drivers/sensor/ism330dhcx/
Dism330dhcx.c381 int64_t dval; in ism330dhcx_accel_convert() local
385 dval = (int64_t)(raw_val) * sensitivity * SENSOR_G_DOUBLE; in ism330dhcx_accel_convert()
386 val->val1 = (int32_t)(dval / 1000000); in ism330dhcx_accel_convert()
387 val->val2 = (int32_t)(dval % 1000000); in ism330dhcx_accel_convert()
430 int64_t dval; in ism330dhcx_gyro_convert() local
434 dval = (int64_t)(raw_val) * sensitivity * SENSOR_DEG2RAD_DOUBLE; in ism330dhcx_gyro_convert()
435 val->val1 = (int32_t)(dval / 1000000); in ism330dhcx_gyro_convert()
436 val->val2 = (int32_t)(dval % 1000000); in ism330dhcx_gyro_convert()
489 double dval; in ism330dhcx_magn_convert() local
492 dval = (double)(raw_val * sensitivity); in ism330dhcx_magn_convert()
[all …]
/Zephyr-Core-3.5.0/drivers/sensor/lsm6dso/
Dlsm6dso.c401 int64_t dval; in lsm6dso_accel_convert() local
405 dval = (int64_t)(raw_val) * sensitivity * SENSOR_G_DOUBLE; in lsm6dso_accel_convert()
406 val->val1 = (int32_t)(dval / 1000000); in lsm6dso_accel_convert()
407 val->val2 = (int32_t)(dval % 1000000); in lsm6dso_accel_convert()
450 int64_t dval; in lsm6dso_gyro_convert() local
454 dval = (int64_t)(raw_val) * sensitivity * SENSOR_DEG2RAD_DOUBLE; in lsm6dso_gyro_convert()
455 val->val1 = (int32_t)(dval / 1000000); in lsm6dso_gyro_convert()
456 val->val2 = (int32_t)(dval % 1000000); in lsm6dso_gyro_convert()
509 double dval; in lsm6dso_magn_convert() local
512 dval = (double)(raw_val * sensitivity); in lsm6dso_magn_convert()
[all …]
/Zephyr-Core-3.5.0/drivers/sensor/lsm6dso16is/
Dlsm6dso16is.c425 int64_t dval; in lsm6dso16is_accel_convert() local
429 dval = (int64_t)(raw_val) * sensitivity * SENSOR_G_DOUBLE; in lsm6dso16is_accel_convert()
430 val->val1 = (int32_t)(dval / 1000000); in lsm6dso16is_accel_convert()
431 val->val2 = (int32_t)(dval % 1000000); in lsm6dso16is_accel_convert()
474 int64_t dval; in lsm6dso16is_gyro_convert() local
478 dval = (int64_t)(raw_val) * sensitivity * SENSOR_DEG2RAD_DOUBLE; in lsm6dso16is_gyro_convert()
479 val->val1 = (int32_t)(dval / 1000000); in lsm6dso16is_gyro_convert()
480 val->val2 = (int32_t)(dval % 1000000); in lsm6dso16is_gyro_convert()
539 double dval; in lsm6dso16is_magn_convert() local
542 dval = (double)(raw_val * sensitivity); in lsm6dso16is_magn_convert()
[all …]
/Zephyr-Core-3.5.0/drivers/sensor/lsm6dsv16x/
Dlsm6dsv16x.c471 int64_t dval; in lsm6dsv16x_accel_convert() local
475 dval = (int64_t)(raw_val) * sensitivity * SENSOR_G_DOUBLE; in lsm6dsv16x_accel_convert()
476 val->val1 = (int32_t)(dval / 1000000); in lsm6dsv16x_accel_convert()
477 val->val2 = (int32_t)(dval % 1000000); in lsm6dsv16x_accel_convert()
520 int64_t dval; in lsm6dsv16x_gyro_convert() local
524 dval = (int64_t)(raw_val) * sensitivity * SENSOR_DEG2RAD_DOUBLE; in lsm6dsv16x_gyro_convert()
525 val->val1 = (int32_t)(dval / 1000000); in lsm6dsv16x_gyro_convert()
526 val->val2 = (int32_t)(dval % 1000000); in lsm6dsv16x_gyro_convert()
585 double dval; in lsm6dsv16x_magn_convert() local
588 dval = (double)(raw_val * sensitivity); in lsm6dsv16x_magn_convert()
[all …]
/Zephyr-Core-3.5.0/drivers/sensor/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.5.0/drivers/sensor/iis2iclx/
Diis2iclx.c279 int64_t dval; in iis2iclx_accel_convert() local
283 dval = (int64_t)(raw_val) * sensitivity * SENSOR_G_DOUBLE; in iis2iclx_accel_convert()
284 val->val1 = (int32_t)(dval / 1000000); in iis2iclx_accel_convert()
285 val->val2 = (int32_t)(dval % 1000000); in iis2iclx_accel_convert()
336 double dval; in iis2iclx_magn_convert() local
339 dval = (double)(raw_val * sensitivity); in iis2iclx_magn_convert()
340 val->val1 = (int32_t)dval / 1000000; in iis2iclx_magn_convert()
341 val->val2 = (int32_t)dval % 1000000; in iis2iclx_magn_convert()
/Zephyr-Core-3.5.0/drivers/sensor/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.5.0/drivers/sensor/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.5.0/drivers/sensor/lis2ds12/
Dlis2ds12.c215 int64_t dval; in lis2ds12_convert() local
219 dval = ((int64_t)raw_val * gain * SENSOR_G) / 1000; in lis2ds12_convert()
220 val->val1 = dval / 1000000LL; in lis2ds12_convert()
221 val->val2 = dval % 1000000LL; in lis2ds12_convert()
/Zephyr-Core-3.5.0/drivers/sensor/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.5.0/drivers/sensor/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.5.0/drivers/sensor/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()