/Zephyr-Core-2.7.6/samples/sensor/sht3xd/src/ |
D | main.c | 58 printf("Alert outside %d..%d %%RH got %d\n", lo_thr.val1, in main() 59 hi_thr.val1, rc); in main() 81 if (lo_thr.val1 > hum.val1) { in main() 83 hum.val1, lo_thr.val1); in main() 84 } else if (hi_thr.val1 < hum.val1) { in main() 86 hum.val1, hi_thr.val1); in main() 89 lo_thr.val1, hum.val1, hi_thr.val1); in main()
|
/Zephyr-Core-2.7.6/drivers/sensor/ |
D | shell_battery.c | 91 shell_fprintf(shell, SHELL_NORMAL, "Temp: %.1d.%02d C\n", temp.val1, in cmd_battery() 93 shell_fprintf(shell, SHELL_NORMAL, "V: %5d.%02d V\n", volt.val1, in cmd_battery() 96 v_desired.val1, v_desired.val2 / 10000); in cmd_battery() 97 shell_fprintf(shell, SHELL_NORMAL, "I: %d mA", current.val1); in cmd_battery() 98 if (current.val1 > 0) { in cmd_battery() 100 } else if (current.val1 < 0) { in cmd_battery() 105 i_desired.val1); in cmd_battery() 106 allowed = i_desired.val1 && v_desired.val2 && charge.val1 < 100; in cmd_battery() 109 shell_fprintf(shell, SHELL_NORMAL, "Charge: %d %%\n", charge.val1); in cmd_battery() 111 v_design.val1, v_design.val2 / 10000); in cmd_battery() [all …]
|
/Zephyr-Core-2.7.6/drivers/sensor/mcux_acmp/ |
D | mcux_acmp.c | 91 int32_t val1; in mcux_acmp_attr_set() local 102 val1 = val->val1; in mcux_acmp_attr_set() 107 if (val1 >= kACMP_OffsetLevel0 && in mcux_acmp_attr_set() 108 val1 <= kACMP_OffsetLevel1) { in mcux_acmp_attr_set() 109 LOG_DBG("offset = %d", val1); in mcux_acmp_attr_set() 110 data->config.offsetMode = val1; in mcux_acmp_attr_set() 119 if (val1 >= kACMP_HysteresisLevel0 && in mcux_acmp_attr_set() 120 val1 <= kACMP_HysteresisLevel3) { in mcux_acmp_attr_set() 121 LOG_DBG("hysteresis = %d", val1); in mcux_acmp_attr_set() 122 data->config.hysteresisMode = val1; in mcux_acmp_attr_set() [all …]
|
/Zephyr-Core-2.7.6/samples/sensor/bmi270/src/ |
D | main.c | 31 full_scale.val1 = 2; /* G */ in main() 33 sampling_freq.val1 = 100; /* Hz. Performance mode */ in main() 35 oversampling.val1 = 1; /* Normal mode */ in main() 52 full_scale.val1 = 500; /* dps */ in main() 54 sampling_freq.val1 = 100; /* Hz. Performance mode */ in main() 56 oversampling.val1 = 1; /* Normal mode */ 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/tests/drivers/sensor/generic/src/ |
D | main.c | 120 zassert_equal(data.val1, chan_elements[0].data.val1, in test_sensor_get_channels() 132 zassert_equal(data.val1, chan_elements[i].data.val1, in test_sensor_get_channels() 220 zassert_equal(trigger_elements[i].data.val1, in test_sensor_handle_triggers() 221 data.val1, "read-back returned wrong val1"); in test_sensor_handle_triggers() 238 zassert_equal(data.val1, trigger_elements[i].data.val1, in test_sensor_handle_triggers() 278 zassert_equal(data.val1, SENSOR_G/1000000LL, in test_sensor_unit_conversion() 280 zassert_equal(data.val2, SENSOR_G%(data.val1 * 1000000LL), in test_sensor_unit_conversion() 285 data.val1 = -data.val1; in test_sensor_unit_conversion() 292 zassert_equal(data.val1, SENSOR_PI/1000000LL, in test_sensor_unit_conversion() 294 zassert_equal(data.val2, SENSOR_PI%(data.val1 * 1000000LL), in test_sensor_unit_conversion() [all …]
|
D | dummy_sensor.c | 41 val->val1 = data->val[0].val1; in dummy_sensor_channel_get() 45 val->val1 = data->val[1].val1; in dummy_sensor_channel_get() 49 val->val1 = data->val[2].val1; in dummy_sensor_channel_get() 53 val->val1 = data->val[3].val1; in dummy_sensor_channel_get() 57 val->val1 = data->val[4].val1; in dummy_sensor_channel_get() 98 data->val[i].val1 = i; in dummy_sensor_init() 114 data->val[4].val1 = val->val1; in dummy_sensor_attr_set() 131 val->val1 = data->val[4].val1; in dummy_sensor_attr_get()
|
/Zephyr-Core-2.7.6/samples/sensor/sgp40_sht4x/src/ |
D | main.c | 48 heater_p.val1 = CONFIG_APP_HEATER_PULSE_POWER; in main() 49 heater_d.val1 = CONFIG_APP_HEATER_PULSE_DURATION; in main() 75 if (hum.val1 > CONFIG_APP_HEATER_HUMIDITY_THRESH && in main() 76 temp.val1 < SHT4X_HEATER_MAX_TEMP) { in main() 89 comp_t.val1 = temp.val1; /* Temp [°C] */ in main() 90 comp_rh.val1 = hum.val1; /* RH [%] */ in main() 110 gas.val1); in main()
|
/Zephyr-Core-2.7.6/samples/sensor/bq274xx/src/ |
D | main.c | 14 if ((value.val2 < 0) && (value.val1 >= 0)) { 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() 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() 117 printk("State of charge: %d%%\n", state_of_charge.val1); in do_main() 134 printk("State of health: %d%%\n", state_of_health.val1); in do_main() [all …]
|
/Zephyr-Core-2.7.6/subsys/net/lib/lwm2m/ |
D | ipso_humidity_sensor.c | 80 min_measured_value[index].val1 = sensor_value[index].val1; in update_min_measured() 87 max_measured_value[index].val1 = sensor_value[index].val1; in update_max_measured() 121 if (sensor_value[i].val1 < min_measured_value[i].val1) { in sensor_value_write_cb() 123 } else if (sensor_value[i].val1 == in sensor_value_write_cb() 124 min_measured_value[i].val1 && in sensor_value_write_cb() 130 if (sensor_value[i].val1 > max_measured_value[i].val1) { in sensor_value_write_cb() 132 } else if (sensor_value[i].val1 == in sensor_value_write_cb() 133 max_measured_value[i].val1 && in sensor_value_write_cb() 180 sensor_value[index].val1 = 0; in humidity_sensor_create() 183 min_measured_value[index].val1 = INT32_MAX; in humidity_sensor_create() [all …]
|
D | ipso_pressure_sensor.c | 81 min_measured_value[index].val1 = sensor_value[index].val1; in update_min_measured() 88 max_measured_value[index].val1 = sensor_value[index].val1; in update_max_measured() 122 if (sensor_value[i].val1 < min_measured_value[i].val1) { in sensor_value_write_cb() 124 } else if (sensor_value[i].val1 == in sensor_value_write_cb() 125 min_measured_value[i].val1 && in sensor_value_write_cb() 131 if (sensor_value[i].val1 > max_measured_value[i].val1) { in sensor_value_write_cb() 133 } else if (sensor_value[i].val1 == in sensor_value_write_cb() 134 max_measured_value[i].val1 && in sensor_value_write_cb() 181 sensor_value[index].val1 = 0; in pressure_sensor_create() 184 min_measured_value[index].val1 = INT32_MAX; in pressure_sensor_create() [all …]
|
D | ipso_temp_sensor.c | 81 min_measured_value[index].val1 = sensor_value[index].val1; in update_min_measured() 89 max_measured_value[index].val1 = sensor_value[index].val1; in update_max_measured() 124 if (sensor_value[i].val1 < min_measured_value[i].val1) { in sensor_value_write_cb() 126 } else if (sensor_value[i].val1 == in sensor_value_write_cb() 127 min_measured_value[i].val1 && in sensor_value_write_cb() 133 if (sensor_value[i].val1 > max_measured_value[i].val1) { in sensor_value_write_cb() 135 } else if (sensor_value[i].val1 == in sensor_value_write_cb() 136 max_measured_value[i].val1 && in sensor_value_write_cb() 181 sensor_value[index].val1 = 0; in temp_sensor_create() 184 min_measured_value[index].val1 = INT32_MAX; in temp_sensor_create() [all …]
|
D | ipso_generic_sensor.c | 94 min_measured_value[index].val1 = sensor_value[index].val1; in update_min_measured() 101 max_measured_value[index].val1 = sensor_value[index].val1; in update_max_measured() 135 if (sensor_value[i].val1 < min_measured_value[i].val1) { in sensor_value_write_cb() 137 } else if (sensor_value[i].val1 == in sensor_value_write_cb() 138 min_measured_value[i].val1 && in sensor_value_write_cb() 144 if (sensor_value[i].val1 > max_measured_value[i].val1) { in sensor_value_write_cb() 146 } else if (sensor_value[i].val1 == in sensor_value_write_cb() 147 max_measured_value[i].val1 && in sensor_value_write_cb() 193 sensor_value[index].val1 = 0; in generic_sensor_create() 196 min_measured_value[index].val1 = INT32_MAX; in generic_sensor_create() [all …]
|
D | lwm2m_util.c | 26 if (f32->val1 == 0 && f32->val2 == 0) { in lwm2m_f32_to_b32() 32 v = abs(f32->val1); in lwm2m_f32_to_b32() 75 if (f32->val1 == 0) { in lwm2m_f32_to_b32() 78 b32[0] = f32->val1 < 0 ? 0x80 : 0; in lwm2m_f32_to_b32() 106 if (f32->val1 == 0 && f32->val2 == 0) { in lwm2m_f32_to_b64() 112 v = abs(f32->val1); in lwm2m_f32_to_b64() 155 if (f32->val1 == 0) { in lwm2m_f32_to_b64() 158 b64[0] = f32->val1 < 0 ? 0x80 : 0; in lwm2m_f32_to_b64() 188 f32->val1 = 0; in lwm2m_b32_to_f32() 214 f32->val1 = (f >> (23 - e)) * (sign ? -1 : 1); in lwm2m_b32_to_f32() [all …]
|
/Zephyr-Core-2.7.6/samples/sensor/ccs811/src/ |
D | main.c | 62 now_str(), co2.val1, tvoc.val1); in do_fetch() 63 printk("Voltage: %d.%06dV; Current: %d.%06dA\n", voltage.val1, in do_fetch() 64 voltage.val2, current.val1, current.val2); in do_fetch() 141 temp.val1, humidity.val1, rc); in main() 151 .val1 = CONFIG_APP_CO2_MEDIUM_PPM, in main() 156 printk("L/M threshold to %d got %d\n", thr.val1, rc); in main() 160 .val1 = CONFIG_APP_CO2_HIGH_PPM, in main() 165 printk("M/H threshold to %d got %d\n", thr.val1, rc); in main()
|
/Zephyr-Core-2.7.6/drivers/sensor/icm42605/ |
D | icm42605.c | 34 val->val1 = conv_val / 1000000; in icm42605_convert_accel() 47 val->val1 = conv_val / 1000000; in icm42605_convert_gyro() 55 val->val1 = (((int64_t)raw_val * 100) / 207) + 25; in icm42605_convert_temp() 59 val->val1--; in icm42605_convert_temp() 62 val->val1++; in icm42605_convert_temp() 266 if (val->val1 > 8000 || val->val1 < 1) { in icm42605_attr_set() 270 drv_data->accel_hz = val->val1; in icm42605_attr_set() 273 if (val->val1 < ACCEL_FS_16G || in icm42605_attr_set() 274 val->val1 > ACCEL_FS_2G) { in icm42605_attr_set() 278 drv_data->accel_sf = val->val1; in icm42605_attr_set() [all …]
|
/Zephyr-Core-2.7.6/drivers/sensor/sbs_gauge/ |
D | sbs_gauge.c | 56 val->val1 = data->voltage / 1000; in sbs_gauge_channel_get() 61 val->val1 = data->avg_current / 1000; in sbs_gauge_channel_get() 68 val->val1 = int_temp / 100; in sbs_gauge_channel_get() 73 val->val1 = data->state_of_charge; in sbs_gauge_channel_get() 77 val->val1 = data->full_charge_capacity; in sbs_gauge_channel_get() 81 val->val1 = data->remaining_charge_capacity; in sbs_gauge_channel_get() 85 val->val1 = data->nom_avail_capacity; in sbs_gauge_channel_get() 89 val->val1 = data->full_avail_capacity; in sbs_gauge_channel_get() 93 val->val1 = data->time_to_empty; in sbs_gauge_channel_get() 97 val->val1 = data->time_to_full; in sbs_gauge_channel_get() [all …]
|
/Zephyr-Core-2.7.6/samples/sensor/bme680/src/ |
D | main.c | 29 temp.val1, temp.val2, press.val1, press.val2, in main() 30 humidity.val1, humidity.val2, gas_res.val1, in main()
|
/Zephyr-Core-2.7.6/drivers/sensor/fxos8700/ |
D | fxos8700.c | 30 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/drivers/timer/ |
D | cortex_m_systick.c | 85 uint32_t val1 = SysTick->VAL; /* A */ in elapsed() local 104 || (val1 < val2)) { in elapsed() 183 uint32_t val1, val2; in sys_clock_set_timeout() local 193 val1 = 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/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() 112 attr.val1 = 4; in test_trigger_mode() 141 attr.val1 = 100; in test_trigger_mode()
|
/Zephyr-Core-2.7.6/samples/sensor/fxos8700-hid/src/ |
D | main.c | 143 LOG_DBG("int parts: X %d Y %d", val[0].val1, val[1].val1); in read_accel() 147 if (val[0].val1 != 0) { in read_accel() 148 status[MOUSE_X_REPORT_POS] = val[0].val1 * 4; in read_accel() 151 if (val[1].val1 != 0) { in read_accel() 152 status[MOUSE_Y_REPORT_POS] = val[1].val1 * 4; in read_accel() 155 if (val[0].val1 != 0 || val[1].val1 != 0) { in read_accel() 221 .val1 = 6, in main()
|
/Zephyr-Core-2.7.6/samples/sensor/ms5837/src/ |
D | main.c | 34 oversampling_rate.val1); in main() 46 printf("Temperature: %d.%06d, Pressure: %d.%06d\n", temp.val1, in main() 47 temp.val2, press.val1, press.val2); in main()
|
/Zephyr-Core-2.7.6/drivers/sensor/max17262/ |
D | max17262.c | 73 val->val1 = val_millis / 1000; in convert_millis() 99 valp->val1 = tmp / 1000000; in max17262_channel_get() 107 valp->val1 = current / 1000000; in max17262_channel_get() 112 valp->val1 = data->state_of_charge / 256; in max17262_channel_get() 116 valp->val1 = data->internal_temp / 256; in max17262_channel_get() 128 valp->val1 = 0; in max17262_channel_get() 138 valp->val1 = 0; in max17262_channel_get() 146 valp->val1 = data->cycle_count / 100; in max17262_channel_get() 159 valp->val1 = data->ichg_term; in max17262_channel_get() 165 valp->val1 = data->coulomb_counter / 2; in max17262_channel_get()
|
/Zephyr-Core-2.7.6/drivers/sensor/sht4x/ |
D | sht4x.c | 137 val->val1 = (int32_t)(tmp / 0xFFFF) - 45; in sht4x_channel_get() 143 val->val1 = (uint32_t)(tmp / 0xFFFF) - 6U; in sht4x_channel_get() 159 if (val->val1 < 0) { in sht4x_attr_set() 165 if (val->val1 > SHT4X_HEATER_POWER_IDX_MAX) { in sht4x_attr_set() 168 data->heater_power = val->val1; in sht4x_attr_set() 171 if (val->val1 > SHT4X_HEATER_DURATION_IDX_MAX) { in sht4x_attr_set() 174 data->heater_duration = val->val1; in sht4x_attr_set()
|
/Zephyr-Core-2.7.6/samples/sensor/bme280/src/ |
D | main.c | 55 temp.val1, temp.val2, press.val1, press.val2, in main() 56 humidity.val1, humidity.val2); in main()
|