Home
last modified time | relevance | path

Searched refs:sensor_val (Results 1 – 10 of 10) sorted by relevance

/Zephyr-latest/tests/drivers/sensor/ina237/src/
Dina237_test.c84 struct sensor_value sensor_val; in test_current() local
93 zassert_ok(sensor_channel_get(fixture->dev, SENSOR_CHAN_CURRENT, &sensor_val)); in test_current()
94 double current_actual_A = sensor_value_to_double(&sensor_val); in test_current()
116 struct sensor_value sensor_val; in test_bus_voltage() local
123 zassert_ok(sensor_channel_get(fixture->dev, SENSOR_CHAN_VOLTAGE, &sensor_val)); in test_bus_voltage()
125 double voltage_actual_V = sensor_value_to_double(&sensor_val); in test_bus_voltage()
147 struct sensor_value sensor_val; in test_power() local
158 zassert_ok(sensor_channel_get(fixture->dev, SENSOR_CHAN_POWER, &sensor_val)); in test_power()
159 double power_actual_W = sensor_value_to_double(&sensor_val); in test_power()
183 struct sensor_value sensor_val; in test_temperature() local
[all …]
/Zephyr-latest/tests/drivers/sensor/ina230/src/
Dina230_test.c52 struct sensor_value sensor_val; in test_datasheet_example() local
76 zassert_ok(sensor_channel_get(fixture->dev, SENSOR_CHAN_VOLTAGE, &sensor_val)); in test_datasheet_example()
77 actual = sensor_value_to_double(&sensor_val); in test_datasheet_example()
80 zassert_ok(sensor_channel_get(fixture->dev, SENSOR_CHAN_CURRENT, &sensor_val)); in test_datasheet_example()
81 actual = sensor_value_to_double(&sensor_val); in test_datasheet_example()
84 zassert_ok(sensor_channel_get(fixture->dev, SENSOR_CHAN_POWER, &sensor_val)); in test_datasheet_example()
85 actual = sensor_value_to_double(&sensor_val); in test_datasheet_example()
125 struct sensor_value sensor_val; in test_current() local
134 zassert_ok(sensor_channel_get(fixture->dev, SENSOR_CHAN_CURRENT, &sensor_val)); in test_current()
135 double current_actual_A = sensor_value_to_double(&sensor_val); in test_current()
[all …]
/Zephyr-latest/tests/drivers/sensor/adltc2990/src/
Dmain.c16 #define CHECK_SINGLE_ENDED_VOLTAGE(sensor_val, index, pin_voltage, r1, r2) \ argument
18 zassert_ok(sensor_channel_get(fixture->dev, SENSOR_CHAN_VOLTAGE, sensor_val)); \
20 sensor_val[index].val1 + (float)sensor_val[index].val2 / 1000000, \
25 (double)(sensor_val[index].val1 + (float)sensor_val[index].val2 / 1000000), \
30 #define CHECK_CURRENT(sensor_val, index, pin_voltage, r_microohms) \ argument
32 zassert_ok(sensor_channel_get(fixture->dev, SENSOR_CHAN_CURRENT, sensor_val)); \
34 sensor_val[index].val1 + (float)sensor_val[index].val2 / 1000000, \
39 (double)(sensor_val[index].val1 + (float)sensor_val[index].val2 / 1000000), \
46 #define CHECK_TEMPERATURE(sensor_val, index, expected_temperature, temperature_type) \ argument
48 zassert_ok(sensor_channel_get(fixture->dev, temperature_type, sensor_val)); \
[all …]
/Zephyr-latest/tests/drivers/w1/w1_api/src/
Dmain.c137 struct sensor_value sensor_val = {-1, -1}; in ZTEST_USER() local
139 w1_rom_to_sensor_value(&rom_01, &sensor_val); in ZTEST_USER()
140 w1_sensor_value_to_rom(&sensor_val, &rom_x); in ZTEST_USER()
144 w1_rom_to_sensor_value(&rom_02, &sensor_val); in ZTEST_USER()
145 w1_sensor_value_to_rom(&sensor_val, &rom_x); in ZTEST_USER()
149 w1_rom_to_sensor_value(&rom_03, &sensor_val); in ZTEST_USER()
150 w1_sensor_value_to_rom(&sensor_val, &rom_x); in ZTEST_USER()
/Zephyr-latest/samples/sensor/adt7420/src/
Dmain.c55 struct sensor_value sensor_val; in sensor_set_attribute() local
58 sensor_val.val1 = value / UCEL_PER_CEL; in sensor_set_attribute()
59 sensor_val.val2 = value % UCEL_PER_CEL; in sensor_set_attribute()
61 ret = sensor_attr_set(dev, chan, attr, &sensor_val); in sensor_set_attribute()
/Zephyr-latest/samples/net/secure_mqtt_sensor_actuator/src/
Ddevice.c58 struct sensor_value sensor_val; in device_read_sensor() local
75 rc = sensor_channel_get(sensor, SENSOR_CHAN, &sensor_val); in device_read_sensor()
82 sample->value = sensor_value_to_double(&sensor_val); in device_read_sensor()
/Zephyr-latest/drivers/fuel_gauge/composite/
Dfuel_gauge_composite.c26 struct sensor_value sensor_val; in composite_read_micro() local
37 rc = sensor_channel_get(dev, chan, &sensor_val); in composite_read_micro()
45 *val = sensor_value_to_micro(&sensor_val); in composite_read_micro()
/Zephyr-latest/drivers/clock_control/
Dnrf_clock_calibration.c189 struct sensor_value sensor_val; in get_temperature() local
194 &sensor_val); in get_temperature()
197 *tvp = sensor_value_to_temp_unit(&sensor_val); in get_temperature()
/Zephyr-latest/tests/net/lib/lwm2m/lwm2m_registry/src/
Dlwm2m_registry.c316 double sensor_val; in ZTEST() local
347 ret = lwm2m_get_f64(&LWM2M_OBJ(3303, 0, 5700), &sensor_val); in ZTEST()
/Zephyr-latest/doc/releases/
Drelease-notes-2.7.rst1913 * :github:`24051` - double to sensor_val