Lines Matching +full:0 +full:f

21 		(pin_voltage - 0.01f) * ((r1 + r2) / (float)r2),                                   \
22 (pin_voltage + 0.01f) * ((r1 + r2) / (float)r2), \
23 "%f Out of Range [%f,%f] input %f, [%dmΩ, %dmΩ] " \
26 (double)((pin_voltage - 0.01f) * ((r1 + r2) / (float)r2)), \
27 (double)((pin_voltage + 0.01f) * ((r1 + r2) / (float)r2)), (double)pin_voltage, \
35 (pin_voltage - 0.01f) * ADLTC2990_MICROOHM_CONVERSION_FACTOR / r_microohms, \
36 (pin_voltage + 0.01f) * ADLTC2990_MICROOHM_CONVERSION_FACTOR / r_microohms, \
37 "%f Out of Range [%f,%f] input %f, current-resistor: %dµΩ\nCheck if the sensor " \
40 (double)((pin_voltage - 0.001f) * ADLTC2990_MICROOHM_CONVERSION_FACTOR / \
42 (double)((pin_voltage + 0.001f) * ADLTC2990_MICROOHM_CONVERSION_FACTOR / \
51 "expected %f, got %f", (double)expected_temperature, \
54 /*** TEST-SUITE: ADLTC2990 Measurement Mode 0 0***/
73 static void adltc2990_0_0_before(void *f) in adltc2990_0_0_before() argument
75 struct adltc2990_0_0_fixture *fixture = f; in adltc2990_0_0_before()
111 static void adltc2990_4_3_before(void *f) in adltc2990_4_3_before() argument
113 struct adltc2990_4_3_fixture *fixture = f; in adltc2990_4_3_before()
124 zassert_equal(0, sensor_sample_fetch_chan(fixture->dev, SENSOR_CHAN_VOLTAGE)); in ZTEST_F()
125 zassert_equal(0, sensor_channel_get(fixture->dev, SENSOR_CHAN_VOLTAGE, value)); in ZTEST_F()
126 zassert_equal(0, sensor_sample_fetch_chan(fixture->dev, SENSOR_CHAN_AMBIENT_TEMP)); in ZTEST_F()
127 zassert_equal(0, sensor_channel_get(fixture->dev, SENSOR_CHAN_AMBIENT_TEMP, value)); in ZTEST_F()
128 zassert_equal(0, sensor_sample_fetch_chan(fixture->dev, SENSOR_CHAN_CURRENT)); in ZTEST_F()
129 zassert_equal(0, sensor_channel_get(fixture->dev, SENSOR_CHAN_CURRENT, value)); in ZTEST_F()
151 static void adltc2990_1_3_before(void *f) in adltc2990_1_3_before() argument
153 struct adltc2990_1_3_fixture *fixture = f; in adltc2990_1_3_before()
163 uint8_t msb = 0b00000111, lsb = 0b11010000; in ZTEST_F()
170 CHECK_TEMPERATURE(temp_value, 0, 125.00f, SENSOR_CHAN_DIE_TEMP); in ZTEST_F()
172 /*0b00011101 0b10000000 –40.0000*/ in ZTEST_F()
173 msb = 0b00011101; in ZTEST_F()
174 lsb = 0b10000000; in ZTEST_F()
179 CHECK_TEMPERATURE(temp_value, 0, -40.00f, SENSOR_CHAN_DIE_TEMP); in ZTEST_F()
184 /* 0b00000001 0b10010001 +25.0625 */ in ZTEST_F()
185 uint8_t msb = 0b00000001, lsb = 0b10010001; in ZTEST_F()
191 CHECK_TEMPERATURE(temp_ambient, 0, 25.06250f, SENSOR_CHAN_AMBIENT_TEMP); in ZTEST_F()
196 /* 0b00111100 0b01011000 +0.300 */ in ZTEST_F()
197 uint8_t msb_reg_value = 0b00111100, lsb_reg_value = 0b01011000; in ZTEST_F()
205 CHECK_CURRENT(current_values, 0, 0.3f, dev_config->pins_v1_v2.pins_current_resistor); in ZTEST_F()
207 /* 0b00100000 0b00000000 +0.159 */ in ZTEST_F()
208 msb_reg_value = 0b00100000, lsb_reg_value = 0b00000000; in ZTEST_F()
211 CHECK_CURRENT(current_values, 0, 0.159f, dev_config->pins_v1_v2.pins_current_resistor); in ZTEST_F()
216 uint8_t msb = 0b01100000, lsb = 0b00000000; in ZTEST_F()
221 msb = 0b00000010; in ZTEST_F()
222 lsb = 0b10001111; in ZTEST_F()
232 float test_value = voltage_values[0].val1 + (float)voltage_values[0].val2 / 1000000; in ZTEST_F()
234 zassert_between_inclusive(test_value, -0.16f, -0.159f, "Out of Range [-0.16,-0.159]%.6f", in ZTEST_F()
238 zassert_between_inclusive(test_value, 2.69f, 2.7f, "Out of Range [2.69, 2.7]%.6f", in ZTEST_F()
261 static void adltc2990_5_3_before(void *f) in adltc2990_5_3_before() argument
263 struct adltc2990_5_3_fixture *fixture = f; in adltc2990_5_3_before()
272 /*Kelvin 0b00010001 0b00010010 273.1250*/ in ZTEST_F()
273 uint8_t msb = 0b00010001, lsb = 0b00010010; in ZTEST_F()
280 CHECK_TEMPERATURE(temp_value, 0, 273.1250f, SENSOR_CHAN_AMBIENT_TEMP); in ZTEST_F()
282 /*Kelvin 0b00001110 0b10010010 233.125*/ in ZTEST_F()
283 msb = 0b00001110; in ZTEST_F()
284 lsb = 0b10010010; in ZTEST_F()
287 CHECK_TEMPERATURE(temp_value, 1, 233.1250f, SENSOR_CHAN_AMBIENT_TEMP); in ZTEST_F()
292 /*0b00011000 0b11100010 398.1250*/ in ZTEST_F()
293 uint8_t msb = 0b00011000, lsb = 0b11100010; in ZTEST_F()
300 CHECK_TEMPERATURE(temp_value, 0, 398.1250f, SENSOR_CHAN_DIE_TEMP); in ZTEST_F()
322 static void adltc2990_6_3_before(void *f) in adltc2990_6_3_before() argument
324 struct adltc2990_6_3_fixture *fixture = f; in adltc2990_6_3_before()
333 /* 0b00111100 0b01011000 +0.300 */ in ZTEST_F()
334 uint8_t msb_reg_value = 0b00111100, lsb_reg_value = 0b01011000; in ZTEST_F()
342 CHECK_CURRENT(current_values, 0, 0.3f, dev_config->pins_v1_v2.pins_current_resistor); in ZTEST_F()
344 /* 0b00100000 0b00000000 +0.159 */ in ZTEST_F()
345 msb_reg_value = 0b00100000, lsb_reg_value = 0b00000000; in ZTEST_F()
348 CHECK_CURRENT(current_values, 1, 0.159f, dev_config->pins_v3_v4.pins_current_resistor); in ZTEST_F()
369 static void adltc2990_7_3_before(void *f) in adltc2990_7_3_before() argument
371 struct adltc2990_7_3_fixture *fixture = f; in adltc2990_7_3_before()
386 uint8_t is_busy = BIT(0); in ZTEST_F()
390 is_busy = 0; in ZTEST_F()
392 zassert_equal(0, sensor_sample_fetch_chan(fixture->dev, SENSOR_CHAN_ALL)); in ZTEST_F()
399 uint8_t msb = 0b00011000, lsb = 0b11100010; in ZTEST_F()
411 CHECK_TEMPERATURE(die_temp_value, 0, 398.1250f, SENSOR_CHAN_DIE_TEMP); in ZTEST_F()
416 /* 0b00111111 0b11111111 >5 */ in ZTEST_F()
417 uint8_t msb_reg_value = 0b00111111, lsb_reg_value = 0b11111111; in ZTEST_F()
422 /* 0b00101100 0b11001101 3.500 */ in ZTEST_F()
423 msb_reg_value = 0b00101100; in ZTEST_F()
424 lsb_reg_value = 0b11001101; in ZTEST_F()
428 /* 0b00011111 0b11111111 2.500 */ in ZTEST_F()
429 msb_reg_value = 0b00011111; in ZTEST_F()
430 lsb_reg_value = 0b11111111; in ZTEST_F()
434 /* 0b01111100 0b00101001 –0.300 */ in ZTEST_F()
435 msb_reg_value = 0b01111100; in ZTEST_F()
436 lsb_reg_value = 0b00101001; in ZTEST_F()
441 msb_reg_value = 0b00101100; in ZTEST_F()
442 lsb_reg_value = 0b11001101; in ZTEST_F()
450 CHECK_SINGLE_ENDED_VOLTAGE(voltage_values, 0, 5.0f, in ZTEST_F()
451 dev_config->pins_v1_v2.voltage_divider_resistors.v1_r1_r2[0], in ZTEST_F()
454 CHECK_SINGLE_ENDED_VOLTAGE(voltage_values, 1, 3.5f, in ZTEST_F()
455 dev_config->pins_v1_v2.voltage_divider_resistors.v2_r1_r2[0], in ZTEST_F()
458 CHECK_SINGLE_ENDED_VOLTAGE(voltage_values, 2, 2.5f, in ZTEST_F()
459 dev_config->pins_v3_v4.voltage_divider_resistors.v3_r1_r2[0], in ZTEST_F()
462 CHECK_SINGLE_ENDED_VOLTAGE(voltage_values, 3, -0.3f, in ZTEST_F()
463 dev_config->pins_v3_v4.voltage_divider_resistors.v4_r1_r2[0], in ZTEST_F()
468 zassert_between_inclusive(test_value, 6.0, 6.1, "Out of Range [6.0,6.1] %.6f", in ZTEST_F()
492 static void adltc2990_incorrect_before(void *f) in adltc2990_incorrect_before() argument
494 struct adltc2990_incorrect_fixture *fixture = f; in adltc2990_incorrect_before()