/Zephyr-Core-3.7.0/samples/sensor/bmi270/src/ |
D | main.c | 29 full_scale.val2 = 0; in main() 31 sampling_freq.val2 = 0; in main() 33 oversampling.val2 = 0; in main() 50 full_scale.val2 = 0; in main() 52 sampling_freq.val2 = 0; in main() 54 oversampling.val2 = 0; in main() 79 acc[0].val1, acc[0].val2, in main() 80 acc[1].val1, acc[1].val2, in main() 81 acc[2].val1, acc[2].val2, in main() 82 gyr[0].val1, gyr[0].val2, in main() [all …]
|
/Zephyr-Core-3.7.0/tests/drivers/sensor/generic/src/ |
D | main.c | 122 zassert_equal(data.val2, chan_elements[0].data.val2, in ZTEST() 134 zassert_equal(data.val2, chan_elements[i].data.val2, in ZTEST() 222 zassert_equal(trigger_elements[i].data.val2, in ZTEST() 223 data.val2, "read-back returned wrong val2"); in ZTEST() 240 zassert_equal(data.val2, trigger_elements[i].data.val2, in ZTEST() 282 zassert_equal(data.val2, SENSOR_G%(data.val1 * 1000000LL), in ZTEST() 288 data.val2 = -data.val2; in ZTEST() 296 zassert_equal(data.val2, SENSOR_PI%(data.val1 * 1000000LL), in ZTEST() 302 data.val2 = -data.val2; in ZTEST() 308 data.val2 = -data.val2; in ZTEST() [all …]
|
D | dummy_sensor.c | 42 val->val2 = data->val[0].val2; in dummy_sensor_channel_get() 46 val->val2 = data->val[1].val2; in dummy_sensor_channel_get() 50 val->val2 = data->val[2].val2; in dummy_sensor_channel_get() 54 val->val2 = data->val[3].val2; in dummy_sensor_channel_get() 58 val->val2 = data->val[4].val2; in dummy_sensor_channel_get() 99 data->val[i].val2 = i*i; in dummy_sensor_init() 115 data->val[4].val2 = val->val2; in dummy_sensor_attr_set() 132 val->val2 = data->val[4].val2; in dummy_sensor_attr_get()
|
/Zephyr-Core-3.7.0/samples/sensor/bq274xx/src/ |
D | main.c | 14 if ((value.val2 < 0) && (value.val1 >= 0)) { in bq274xx_show_values() 15 value.val2 = -(value.val2); in bq274xx_show_values() 16 printk("%s: -%d.%06d\n", type, value.val1, value.val2); in bq274xx_show_values() 17 } else if ((value.val2 > 0) && (value.val1 < 0)) { in bq274xx_show_values() 18 printk("%s: %d.%06d\n", type, value.val1, value.val2); in bq274xx_show_values() 19 } else if ((value.val2 < 0) && (value.val1 < 0)) { in bq274xx_show_values() 20 value.val2 = -(value.val2); in bq274xx_show_values() 21 printk("%s: %d.%06d\n", type, value.val1, value.val2); in bq274xx_show_values() 23 printk("%s: %d.%06d\n", type, value.val1, value.val2); in bq274xx_show_values() 49 printk("Voltage: %d.%06dV\n", voltage.val1, voltage.val2); in do_main() [all …]
|
/Zephyr-Core-3.7.0/drivers/sensor/tdk/icm42688/ |
D | icm42688.h | 139 out->val2 = 0; in icm42688_accel_reg_to_hz() 143 out->val2 = 0; in icm42688_accel_reg_to_hz() 147 out->val2 = 0; in icm42688_accel_reg_to_hz() 151 out->val2 = 0; in icm42688_accel_reg_to_hz() 155 out->val2 = 0; in icm42688_accel_reg_to_hz() 159 out->val2 = 0; in icm42688_accel_reg_to_hz() 163 out->val2 = 0; in icm42688_accel_reg_to_hz() 167 out->val2 = 0; in icm42688_accel_reg_to_hz() 171 out->val2 = 0; in icm42688_accel_reg_to_hz() 175 out->val2 = 0; in icm42688_accel_reg_to_hz() [all …]
|
/Zephyr-Core-3.7.0/subsys/net/lib/lwm2m/ |
D | lwm2m_util.c | 28 int32_t val2 = (*in - (int32_t)*in) * PRECISION32; in lwm2m_float_to_b32() local 36 if (val1 == 0 && val2 == 0) { in lwm2m_float_to_b32() 57 v = abs(val2); in lwm2m_float_to_b32() 86 b32[0] = val2 < 0 ? 0x80 : 0; in lwm2m_float_to_b32() 110 int64_t val2 = (*in - (int64_t)*in) * PRECISION64; in lwm2m_float_to_b64() local 118 if (val1 == 0 && val2 == 0) { in lwm2m_float_to_b64() 139 v = llabs(val2); in lwm2m_float_to_b64() 168 b64[0] = val2 < 0 ? 0x80 : 0; in lwm2m_float_to_b64() 195 int32_t val1, val2; in lwm2m_b32_to_float() local 202 val2 = 0; in lwm2m_b32_to_float() [all …]
|
/Zephyr-Core-3.7.0/samples/sensor/bme680/src/ |
D | main.c | 38 temp.val1, temp.val2, press.val1, press.val2, 39 humidity.val1, humidity.val2, gas_res.val1, 40 gas_res.val2);
|
/Zephyr-Core-3.7.0/drivers/sensor/bosch/bmi323/ |
D | bmi323.c | 108 result->val2 = frac_part; in bosch_bmi323_value_to_sensor_value() 117 result->val2 = frac_part; in bosch_bmi323_sensor_value_from_micro() 478 val->val2 = 781250; in bosch_bmi323_driver_api_get_acc_odr() 482 val->val2 = 562500; in bosch_bmi323_driver_api_get_acc_odr() 486 val->val2 = 125000; in bosch_bmi323_driver_api_get_acc_odr() 490 val->val2 = 250000; in bosch_bmi323_driver_api_get_acc_odr() 494 val->val2 = 500000; in bosch_bmi323_driver_api_get_acc_odr() 498 val->val2 = 0; in bosch_bmi323_driver_api_get_acc_odr() 502 val->val2 = 0; in bosch_bmi323_driver_api_get_acc_odr() 506 val->val2 = 0; in bosch_bmi323_driver_api_get_acc_odr() [all …]
|
/Zephyr-Core-3.7.0/samples/sensor/max17262/src/ |
D | main.c | 31 i_avg = avg_current.val1 + (avg_current.val2 / 1000000.0); in main() 34 voltage.val1, voltage.val2, (double)i_avg, in main() 35 temperature.val1, temperature.val2); in main()
|
/Zephyr-Core-3.7.0/samples/sensor/bmg160/src/ |
D | main.c | 34 val[0].val1 + val[0].val2 / 1000000.0, in print_gyro_data() 35 val[1].val1 + val[1].val2 / 1000000.0, in print_gyro_data() 36 val[2].val1 + val[2].val2 / 1000000.0); in print_gyro_data() 49 val.val1 + val.val2 / 1000000.0); in print_temp_data() 113 attr.val2 = 0; in test_trigger_mode() 142 attr.val2 = 0; in test_trigger_mode()
|
/Zephyr-Core-3.7.0/include/zephyr/drivers/ |
D | sensor.h | 55 int32_t val2; member 1154 int64_t micro_ms2 = ms2->val1 * 1000000LL + ms2->val2; in sensor_ms2_to_g() 1172 ms2->val2 = ((int64_t)g * SENSOR_G) % 1000000LL; in sensor_g_to_ms2() 1185 int64_t micro_ms2 = (ms2->val1 * INT64_C(1000000)) + ms2->val2; in sensor_ms2_to_ug() 1199 ms2->val2 = ((int64_t)ug * SENSOR_G / 1000000LL) % 1000000LL; in sensor_ug_to_ms2() 1211 int64_t micro_rad_s = rad->val1 * 1000000LL + rad->val2; in sensor_rad_to_degrees() 1229 rad->val2 = ((int64_t)d * SENSOR_PI / 180LL) % 1000000LL; in sensor_degrees_to_rad() 1245 int64_t micro_rad_s = rad->val1 * 1000000LL + rad->val2; in sensor_rad_to_10udegrees() 1259 rad->val2 = ((int64_t)d * SENSOR_PI / 180LL / 100000LL) % 1000000LL; in sensor_10udegrees_to_rad() 1270 return (double)val->val1 + (double)val->val2 / 1000000; in sensor_value_to_double() [all …]
|
/Zephyr-Core-3.7.0/drivers/timer/ |
D | cortex_m_systick.c | 123 uint32_t val2 = SysTick->VAL; /* C */ in elapsed() local 151 if (val2 == 0) { in elapsed() 152 val2 = last_load; in elapsed() 156 || (val1 < val2)) { in elapsed() 164 return (last_load - val2) + overflow_cyc; in elapsed() 265 uint32_t val1, val2; in sys_clock_set_timeout() local 306 val2 = SysTick->VAL; in sys_clock_set_timeout() 321 if (val1 < val2) { in sys_clock_set_timeout() 322 cycle_count += (val1 + (last_load_ - val2)); in sys_clock_set_timeout() 324 cycle_count += (val1 - val2); in sys_clock_set_timeout()
|
/Zephyr-Core-3.7.0/drivers/sensor/wsen/wsen_hids/ |
D | wsen_hids.c | 25 {.val1 = 0, .val2 = 0}, 26 {.val1 = 1, .val2 = 0}, 27 {.val1 = 7, .val2 = 0}, 28 {.val1 = 12, .val2 = 5 * 100000}, 70 value->val2 = (value_converted % 100) * (1000000 / 100); in hids_channel_get() 76 value->val2 = (value_converted % 100) * (1000000 / 100); in hids_channel_get() 92 odr->val2 == hids_odr_list[odr_index].val2) { in hids_odr_set() 99 LOG_ERR("Bad sampling frequency %d.%d", odr->val1, odr->val2); in hids_odr_set()
|
/Zephyr-Core-3.7.0/samples/shields/npm1300_ek/src/ |
D | main.c | 91 printk("V: %d.%03d ", volt.val1, volt.val2 / 1000); in read_sensors() 93 printk("I: %s%d.%04d ", ((current.val1 < 0) || (current.val2 < 0)) ? "-" : "", in read_sensors() 94 abs(current.val1), abs(current.val2) / 100); in read_sensors() 96 printk("T: %s%d.%02d\n", ((temp.val1 < 0) || (temp.val2 < 0)) ? "-" : "", abs(temp.val1), in read_sensors() 97 abs(temp.val2) / 10000); in read_sensors()
|
/Zephyr-Core-3.7.0/samples/sensor/tmp112/src/ |
D | main.c | 20 attr.val2 = 0; in do_main() 29 attr.val2 = 0; in do_main() 51 temp_value.val2); in do_main()
|
/Zephyr-Core-3.7.0/samples/sensor/sensor_shell/src/ |
D | fake_sensor.c | 26 val->val1, val->val2); in attr_set() 37 val->val2 = attr * 100000; in attr_get() 63 val->val2 = 1; in channel_get() 68 val->val2 = 1; in channel_get()
|
/Zephyr-Core-3.7.0/drivers/sensor/nxp/fxos8700/ |
D | fxos8700.c | 156 if (val->val1 == 400 && val->val2 == 0) { in fxos8700_set_odr() 158 } else if (val->val1 == 200 && val->val2 == 0) { in fxos8700_set_odr() 160 } else if (val->val1 == 100 && val->val2 == 0) { in fxos8700_set_odr() 162 } else if (val->val1 == 50 && val->val2 == 0) { in fxos8700_set_odr() 164 } else if (val->val1 == 25 && val->val2 == 0) { in fxos8700_set_odr() 166 } else if (val->val1 == 6 && val->val2 == 250000) { in fxos8700_set_odr() 168 } else if (val->val1 == 3 && val->val2 == 125000) { in fxos8700_set_odr() 170 } else if (val->val1 == 0 && val->val2 == 781300) { in fxos8700_set_odr() 176 if (val->val1 == 800 && val->val2 == 0) { in fxos8700_set_odr() 178 } else if (val->val1 == 400 && val->val2 == 0) { in fxos8700_set_odr() [all …]
|
/Zephyr-Core-3.7.0/tests/drivers/clock_control/nrf_clock_calibration/src/ |
D | test_nrf_clock_calibration.c | 103 struct sensor_value value = { .val1 = 0, .val2 = 0 }; in ZTEST() 124 struct sensor_value value = { .val1 = 0, .val2 = 0 }; in ZTEST() 143 struct sensor_value value = { .val1 = 0, .val2 = 0 }; in ZTEST() 149 value.val2 += ((CONFIG_CLOCK_CONTROL_NRF_CALIBRATION_TEMP_DIFF - 1) * in ZTEST() 162 value.val2 += (CONFIG_CLOCK_CONTROL_NRF_CALIBRATION_TEMP_DIFF * 250000); in ZTEST()
|
/Zephyr-Core-3.7.0/drivers/sensor/maxim/max17262/ |
D | max17262.c | 71 val->val2 = (val_millis % 1000) * 1000; in convert_millis() 96 valp->val2 = tmp % 1000000; in max17262_channel_get() 104 valp->val2 = current % 1000000; in max17262_channel_get() 109 valp->val2 = data->state_of_charge % 256 * 1000000 / 256; in max17262_channel_get() 113 valp->val2 = data->internal_temp % 256 * 1000000 / 256; in max17262_channel_get() 125 valp->val2 = 0; in max17262_channel_get() 135 valp->val2 = 0; in max17262_channel_get() 143 valp->val2 = data->cycle_count % 100 * 10000; in max17262_channel_get() 156 valp->val2 = 0; in max17262_channel_get() 162 valp->val2 = data->coulomb_counter % 2 * 10 / 2; in max17262_channel_get()
|
/Zephyr-Core-3.7.0/drivers/sensor/ |
D | shell_battery.c | 92 temp.val2 / 10000); in cmd_battery() 94 volt.val2 / 10000); in cmd_battery() 96 v_desired.val1, v_desired.val2 / 10000); in cmd_battery() 106 allowed = i_desired.val1 && v_desired.val2 && charge.val1 < 100; in cmd_battery() 111 v_design.val1, v_design.val2 / 10000); in cmd_battery()
|
/Zephyr-Core-3.7.0/drivers/sensor/silabs/si7006/ |
D | si7006.c | 143 val->val2 = (temp_frac * 15625ULL) >> 17; in si7006_channel_get() 146 val->val1, val->val2); in si7006_channel_get() 159 val->val2 = (rh_frac * 15625) >> 10; in si7006_channel_get() 164 val->val2 -= 1000000; in si7006_channel_get() 167 LOG_DBG("humidity %u = val1:%d, val2:%d", si_data->humidity, val->val1, val->val2); in si7006_channel_get()
|
/Zephyr-Core-3.7.0/samples/sensor/ams_iAQcore/src/ |
D | main.c | 30 co2.val1, co2.val2, in main() 31 voc.val1, voc.val2); in main()
|
/Zephyr-Core-3.7.0/samples/sensor/ens210/src/ |
D | main.c | 29 temperature.val1, temperature.val2, in main() 30 humidity.val1, humidity.val2); in main()
|
/Zephyr-Core-3.7.0/samples/sensor/ti_hdc/src/ |
D | main.c | 38 temp.val1, temp.val2, humidity.val1, humidity.val2); in main()
|
/Zephyr-Core-3.7.0/samples/sensor/dps310/src/ |
D | main.c | 32 temp.val1, abs(temp.val2), press.val1, press.val2); in main()
|