/Zephyr-Core-3.5.0/drivers/sensor/grove/ |
D | light_sensor.c | 65 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()
|
D | temperature_sensor.c | 64 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/ |
D | lsm6ds0.c | 235 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/ |
D | lsm6dsl.c | 470 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/ |
D | ism330dhcx.c | 381 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/ |
D | lsm6dso.c | 401 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/ |
D | lsm6dso16is.c | 425 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/ |
D | lsm6dsv16x.c | 471 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/ |
D | iis2dh.c | 108 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/ |
D | iis2iclx.c | 279 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/ |
D | lsm9ds0_mfd.c | 372 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/ |
D | lsm9ds0_gyro.c | 156 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/ |
D | lis2ds12.c | 215 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/ |
D | itds.c | 266 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/ |
D | iis2dlpc.c | 84 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/ |
D | lis2dw12.c | 87 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()
|