Home
last modified time | relevance | path

Searched refs:val2 (Results 1 – 25 of 166) sorted by relevance

1234567

/Zephyr-Core-2.7.6/samples/sensor/bmi270/src/
Dmain.c32 full_scale.val2 = 0; in main()
34 sampling_freq.val2 = 0; in main()
36 oversampling.val2 = 0; in main()
53 full_scale.val2 = 0; in main()
55 sampling_freq.val2 = 0; in main()
57 oversampling.val2 = 0; in main()
82 acc[0].val1, acc[0].val2, in main()
83 acc[1].val1, acc[1].val2, in main()
84 acc[2].val1, acc[2].val2, in main()
85 gyr[0].val1, gyr[0].val2, in main()
[all …]
/Zephyr-Core-2.7.6/samples/sensor/bq274xx/src/
Dmain.c14 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-2.7.6/tests/drivers/sensor/generic/src/
Ddummy_sensor.c42 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()
Dmain.c122 zassert_equal(data.val2, chan_elements[0].data.val2, in test_sensor_get_channels()
134 zassert_equal(data.val2, chan_elements[i].data.val2, in test_sensor_get_channels()
222 zassert_equal(trigger_elements[i].data.val2, in test_sensor_handle_triggers()
223 data.val2, "read-back returned wrong val2"); in test_sensor_handle_triggers()
240 zassert_equal(data.val2, trigger_elements[i].data.val2, in test_sensor_handle_triggers()
280 zassert_equal(data.val2, SENSOR_G%(data.val1 * 1000000LL), in test_sensor_unit_conversion()
286 data.val2 = -data.val2; in test_sensor_unit_conversion()
294 zassert_equal(data.val2, SENSOR_PI%(data.val1 * 1000000LL), in test_sensor_unit_conversion()
300 data.val2 = -data.val2; in test_sensor_unit_conversion()
306 data.val2 = -data.val2; in test_sensor_unit_conversion()
/Zephyr-Core-2.7.6/subsys/net/lib/lwm2m/
Dlwm2m_util.c26 if (f32->val1 == 0 && f32->val2 == 0) { in lwm2m_f32_to_b32()
47 v = abs(f32->val2); in lwm2m_f32_to_b32()
76 b32[0] = f32->val2 < 0 ? 0x80 : 0; in lwm2m_f32_to_b32()
106 if (f32->val1 == 0 && f32->val2 == 0) { in lwm2m_f32_to_b64()
127 v = abs(f32->val2); in lwm2m_f32_to_b64()
156 b64[0] = f32->val2 < 0 ? 0x80 : 0; in lwm2m_f32_to_b64()
189 f32->val2 = 0; in lwm2m_b32_to_f32()
229 f32->val2 += k; in lwm2m_b32_to_f32()
249 f32->val2 = 0LL; in lwm2m_b64_to_f32()
293 f32->val2 += k; in lwm2m_b64_to_f32()
[all …]
Dipso_humidity_sensor.c81 min_measured_value[index].val2 = sensor_value[index].val2; in update_min_measured()
88 max_measured_value[index].val2 = sensor_value[index].val2; in update_max_measured()
125 sensor_value[i].val2 < in sensor_value_write_cb()
126 min_measured_value[i].val2) { in sensor_value_write_cb()
134 sensor_value[i].val2 > in sensor_value_write_cb()
135 max_measured_value[i].val2) { in sensor_value_write_cb()
181 sensor_value[index].val2 = 0; in humidity_sensor_create()
184 min_measured_value[index].val2 = 0; in humidity_sensor_create()
186 max_measured_value[index].val2 = 0; in humidity_sensor_create()
188 min_range_value[index].val2 = 0; in humidity_sensor_create()
[all …]
Dipso_pressure_sensor.c82 min_measured_value[index].val2 = sensor_value[index].val2; in update_min_measured()
89 max_measured_value[index].val2 = sensor_value[index].val2; in update_max_measured()
126 sensor_value[i].val2 < in sensor_value_write_cb()
127 min_measured_value[i].val2) { in sensor_value_write_cb()
135 sensor_value[i].val2 > in sensor_value_write_cb()
136 max_measured_value[i].val2) { in sensor_value_write_cb()
182 sensor_value[index].val2 = 0; in pressure_sensor_create()
185 min_measured_value[index].val2 = 0; in pressure_sensor_create()
187 max_measured_value[index].val2 = 0; in pressure_sensor_create()
189 min_range_value[index].val2 = 0; in pressure_sensor_create()
[all …]
Dipso_temp_sensor.c82 min_measured_value[index].val2 = sensor_value[index].val2; in update_min_measured()
90 max_measured_value[index].val2 = sensor_value[index].val2; in update_max_measured()
128 sensor_value[i].val2 < in sensor_value_write_cb()
129 min_measured_value[i].val2) { in sensor_value_write_cb()
137 sensor_value[i].val2 > in sensor_value_write_cb()
138 max_measured_value[i].val2) { in sensor_value_write_cb()
182 sensor_value[index].val2 = 0; in temp_sensor_create()
185 min_measured_value[index].val2 = 0; in temp_sensor_create()
187 max_measured_value[index].val2 = 0; in temp_sensor_create()
189 min_range_value[index].val2 = 0; in temp_sensor_create()
[all …]
Dipso_generic_sensor.c95 min_measured_value[index].val2 = sensor_value[index].val2; in update_min_measured()
102 max_measured_value[index].val2 = sensor_value[index].val2; in update_max_measured()
139 sensor_value[i].val2 < in sensor_value_write_cb()
140 min_measured_value[i].val2) { in sensor_value_write_cb()
148 sensor_value[i].val2 > in sensor_value_write_cb()
149 max_measured_value[i].val2) { in sensor_value_write_cb()
194 sensor_value[index].val2 = 0; in generic_sensor_create()
197 min_measured_value[index].val2 = 0; in generic_sensor_create()
199 max_measured_value[index].val2 = 0; in generic_sensor_create()
201 min_range_value[index].val2 = 0; in generic_sensor_create()
[all …]
/Zephyr-Core-2.7.6/samples/sensor/bme680/src/
Dmain.c29 temp.val1, temp.val2, press.val1, press.val2, in main()
30 humidity.val1, humidity.val2, gas_res.val1, in main()
31 gas_res.val2); in main()
/Zephyr-Core-2.7.6/drivers/timer/
Dcortex_m_systick.c87 uint32_t val2 = SysTick->VAL; /* C */ in elapsed() local
104 || (val1 < val2)) { in elapsed()
112 return (last_load - val2) + overflow_cyc; in elapsed()
183 uint32_t val1, val2; in sys_clock_set_timeout() local
225 val2 = SysTick->VAL; in sys_clock_set_timeout()
240 if (val1 < val2) { in sys_clock_set_timeout()
241 cycle_count += (val1 + (last_load_ - val2)); in sys_clock_set_timeout()
243 cycle_count += (val1 - val2); in sys_clock_set_timeout()
/Zephyr-Core-2.7.6/drivers/sensor/fxos8700/
Dfxos8700.c30 if (val->val1 == 400 && val->val2 == 0) { in fxos8700_set_odr()
32 } else if (val->val1 == 200 && val->val2 == 0) { in fxos8700_set_odr()
34 } else if (val->val1 == 100 && val->val2 == 0) { in fxos8700_set_odr()
36 } else if (val->val1 == 50 && val->val2 == 0) { in fxos8700_set_odr()
38 } else if (val->val1 == 25 && val->val2 == 0) { in fxos8700_set_odr()
40 } else if (val->val1 == 6 && val->val2 == 250000) { in fxos8700_set_odr()
42 } else if (val->val1 == 3 && val->val2 == 125000) { in fxos8700_set_odr()
44 } else if (val->val1 == 0 && val->val2 == 781300) { in fxos8700_set_odr()
50 if (val->val1 == 800 && val->val2 == 0) { in fxos8700_set_odr()
52 } else if (val->val1 == 400 && val->val2 == 0) { in fxos8700_set_odr()
[all …]
/Zephyr-Core-2.7.6/samples/sensor/bmg160/src/
Dmain.c34 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-2.7.6/drivers/sensor/max17262/
Dmax17262.c74 val->val2 = (val_millis % 1000) * 1000; in convert_millis()
100 valp->val2 = tmp % 1000000; in max17262_channel_get()
108 valp->val2 = current % 1000000; in max17262_channel_get()
113 valp->val2 = data->state_of_charge % 256 * 1000000 / 256; in max17262_channel_get()
117 valp->val2 = data->internal_temp % 256 * 1000000 / 256; in max17262_channel_get()
129 valp->val2 = 0; in max17262_channel_get()
139 valp->val2 = 0; in max17262_channel_get()
147 valp->val2 = data->cycle_count % 100 * 10000; in max17262_channel_get()
160 valp->val2 = 0; in max17262_channel_get()
166 valp->val2 = data->coulomb_counter % 2 * 10 / 2; in max17262_channel_get()
/Zephyr-Core-2.7.6/samples/sensor/bme280/src/
Dmain.c55 temp.val1, temp.val2, press.val1, press.val2, in main()
56 humidity.val1, humidity.val2); in main()
/Zephyr-Core-2.7.6/samples/sensor/max17262/src/
Dmain.c41 i_avg = avg_current.val1 + (avg_current.val2 / 1000000.0); in main()
44 voltage.val1, voltage.val2, i_avg, in main()
45 temperature.val1, temperature.val2); in main()
/Zephyr-Core-2.7.6/tests/drivers/clock_control/nrf_clock_calibration/src/
Dtest_nrf_clock_calibration.c103 struct sensor_value value = { .val1 = 0, .val2 = 0 }; in test_basic_clock_calibration()
117 struct sensor_value value = { .val1 = 0, .val2 = 0 }; in test_calibration_after_enabling_lfclk()
134 struct sensor_value value = { .val1 = 0, .val2 = 0 }; in test_temp_change_triggers_calibration()
140 value.val2 += ((CONFIG_CLOCK_CONTROL_NRF_CALIBRATION_TEMP_DIFF - 1) * in test_temp_change_triggers_calibration()
153 value.val2 += (CONFIG_CLOCK_CONTROL_NRF_CALIBRATION_TEMP_DIFF * 250000); in test_temp_change_triggers_calibration()
/Zephyr-Core-2.7.6/samples/sensor/tmp112/src/
Dmain.c20 attr.val2 = 0; in do_main()
29 attr.val2 = 0; in do_main()
51 temp_value.val2); in do_main()
/Zephyr-Core-2.7.6/drivers/sensor/
Dshell_battery.c92 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-2.7.6/drivers/sensor/ina23x/
Dina23x.c104 val->val2 = (INA23X_BUS_MV(ina23x->bus_voltage) % 1000) * 1000; in ina23x_channel_get()
107 val->val2 = 0; in ina23x_channel_get()
122 val->val2 = -(current_mag % 1000) * 1000; in ina23x_channel_get()
125 val->val2 = (ina23x->current % 1000) * 1000; in ina23x_channel_get()
129 val->val2 = 0; in ina23x_channel_get()
136 val->val2 = (INA23X_POW_MW(ina23x->power) % 1000) * 1000; in ina23x_channel_get()
139 val->val2 = 0; in ina23x_channel_get()
267 val->val2 = 0; in ina23x_attr_get()
/Zephyr-Core-2.7.6/drivers/sensor/mpu6050/
Dmpu6050.c27 val->val2 = conv_val % 1000000; in mpu6050_convert_accel()
39 val->val2 = conv_val % 1000000; in mpu6050_convert_gyro()
47 val->val2 = ((int64_t)(raw_val % 340) * 1000000) / 340 + 530000; in mpu6050_convert_temp()
49 if (val->val2 < 0) { in mpu6050_convert_temp()
51 val->val2 += 1000000; in mpu6050_convert_temp()
52 } else if (val->val2 >= 1000000) { in mpu6050_convert_temp()
54 val->val2 -= 1000000; in mpu6050_convert_temp()
/Zephyr-Core-2.7.6/drivers/sensor/si7006/
Dsi7006.c117 val->val2 = temp_ucelcius % 1000000; in si7006_channel_get()
119 LOG_DBG("temperature = val1:%d, val2:%d", val->val1, val->val2); in si7006_channel_get()
128 val->val2 = relative_humidity % 1000000; in si7006_channel_get()
130 LOG_DBG("humidity = val1:%d, val2:%d", val->val1, val->val2); in si7006_channel_get()
/Zephyr-Core-2.7.6/include/drivers/
Dsensor.h47 int32_t val2; member
602 int64_t micro_ms2 = ms2->val1 * 1000000LL + ms2->val2; in sensor_ms2_to_g()
620 ms2->val2 = ((int64_t)g * SENSOR_G) % 1000000LL; in sensor_g_to_ms2()
632 int64_t micro_rad_s = rad->val1 * 1000000LL + rad->val2; in sensor_rad_to_degrees()
650 rad->val2 = ((int64_t)d * SENSOR_PI / 180LL) % 1000000LL; in sensor_degrees_to_rad()
661 return (double)val->val1 + (double)val->val2 / 1000000; in sensor_value_to_double()
673 val->val2 = (int32_t)(inp * 1000000) % 1000000; in sensor_value_from_double()
/Zephyr-Core-2.7.6/drivers/sensor/dht/
Ddht.c189 val->val2 = (raw_val % 10) * 100000; in dht_channel_get()
198 val->val2 = (raw_val % 10) * 100000; in dht_channel_get()
203 val->val2 = -val->val2; in dht_channel_get()
210 val->val2 = 0; in dht_channel_get()
213 val->val2 = 0; in dht_channel_get()
/Zephyr-Core-2.7.6/samples/sensor/mcp9808/src/
Dmain.c46 const int temp_ucel = temp->val1 * UCEL_PER_CEL + temp->val2; in set_window()
51 .val2 = low_ucel % UCEL_PER_CEL, in set_window()
57 val.val2 = high_ucel % UCEL_PER_CEL, in set_window()
76 .val2 = temp_ucel % UCEL_PER_CEL, in set_window_ucel()

1234567