/Zephyr-latest/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-latest/samples/sensor/grow_r502a/src/ |
D | main.c | 33 printk("Matched ID : %d\n", find.val1); in finger_find() 58 printk("Fingerprint successfully stored at #%d\n", fid_get.val1); in finger_enroll() 79 printk("template count : %d\n", count.val1); in template_count_get() 168 del.val1 = 3; in main() 174 printk("Fingerprint Deleted at ID #%d\n", del.val1); in main() 182 printk("Fingerprint template free idx at ID #%d\n", fid_get.val1); in main() 185 "Place your finger\n", fid_get.val1); in main()
|
/Zephyr-latest/tests/drivers/sensor/temp_sensor/src/ |
D | main.c | 33 temp_val = (val.val1 * 100) + (val.val2 / 10000); in ZTEST() 37 zassert_true(val.val1 > 10, "Too cold"); in ZTEST() 38 zassert_true(val.val1 < 35, "Too hot"); in ZTEST() 79 val.val1 -= 5; in ZTEST() 85 val.val1 -= 1; in ZTEST() 91 val.val1 = 10; in ZTEST()
|
/Zephyr-latest/drivers/sensor/veaa_x_3/ |
D | veaa_x_3.c | 56 if (val->val1 > cfg->kpa_max || val->val1 < cfg->kpa_min) { in veaa_x_3_attr_set() 57 LOG_ERR("%d kPa outside range", val->val1); in veaa_x_3_attr_set() 62 tmp = val->val1 - cfg->kpa_min; in veaa_x_3_attr_set() 86 val->val1 = cfg->kpa_min; in veaa_x_3_attr_get() 137 if (u32_mul_overflow(data->adc_buf, veaa_x_3_kpa_range(cfg), &val->val1)) { in veaa_x_3_channel_get() 141 val->val2 = (val->val1 % max_adc_val) * 1000000 / max_adc_val; in veaa_x_3_channel_get() 142 val->val1 = (val->val1 / max_adc_val) + cfg->kpa_min; in veaa_x_3_channel_get()
|
/Zephyr-latest/tests/boards/nrf/qdec/src/ |
D | main.c | 122 zassert_within(val.val1, expected_reading, delta, in qenc_emulate_verify_reading() 123 "Expected reading: %d, but got: %d", expected_reading, val.val1); in qenc_emulate_verify_reading() 231 TC_PRINT("QDEC reading: %d\n", val.val1); in ZTEST() 232 zassert_true(val.val1 != 0, "No readings from QDEC"); in ZTEST() 332 zassert_true(val.val1 == 0, "Expected no readings but got: %d", val.val1); in ZTEST() 366 zassert_true(val_first.val1 != 0, "No readings from QDEC"); in ZTEST() 373 zassert_true(val_second.val1 != 0, "No readings from QDEC"); in ZTEST() 378 zassert_true(val_first.val1 == val_second.val1, in ZTEST() 380 val_first.val1, in ZTEST() 381 val_second.val1); in ZTEST() [all …]
|
/Zephyr-latest/drivers/sensor/sensirion/scd4x/ |
D | scd4x.c | 212 (float)(val->val1 + (val->val2 / 1000000.0)) * 0xFFFF / SCD4X_MAX_TEMP; in scd4x_set_temperature_offset() 226 uint16_t altitude = val->val1; in scd4x_set_sensor_altitude() 240 uint16_t ambient_pressure = val->val1; in scd4x_set_ambient_pressure() 255 uint16_t automatic_calib_enable = val->val1; in scd4x_set_automatic_calib_enable() 271 uint16_t initial_period = val->val1; in scd4x_set_self_calib_initial_period() 286 uint16_t standard_period = val->val1; in scd4x_set_self_calib_standard_period() 318 val->val1 = (int32_t)(temp / 0xFFFF); in scd4x_get_temperature_offset() 341 val->val1 = sys_get_be16(rx_buf); in scd4x_get_sensor_altitude() 364 val->val1 = sys_get_be16(rx_buf); in scd4x_get_ambient_pressure() 387 val->val1 = sys_get_be16(rx_buf); in scd4x_get_automatic_calib_enable() [all …]
|
/Zephyr-latest/drivers/sensor/silabs/si7006/ |
D | si7006.c | 141 val->val1 = temp_int; in si7006_channel_get() 146 val->val1, val->val2); in si7006_channel_get() 157 val->val1 = rh_int - 6; /* Apply offset now */ in si7006_channel_get() 162 if (val->val1 < 0) { in si7006_channel_get() 163 val->val1 += 1; 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-latest/drivers/timer/ |
D | cortex_m_systick.c | 119 uint32_t val1 = SysTick->VAL; /* A */ in elapsed() local 146 if (val1 == 0) { in elapsed() 147 val1 = last_load; in elapsed() 154 || (val1 < val2)) { in elapsed() 270 uint32_t val1, val2; in sys_clock_set_timeout() local 280 val1 = SysTick->VAL; in sys_clock_set_timeout() 326 if (val1 < val2) { in sys_clock_set_timeout() 327 cycle_count += (val1 + (last_load_ - val2)); in sys_clock_set_timeout() 329 cycle_count += (val1 - val2); in sys_clock_set_timeout()
|
/Zephyr-latest/drivers/sensor/ti/tmp108/ |
D | tmp108.c | 156 val->val1 = uval / 1000000; in tmp108_channel_get() 179 val->val1 = tmp_val; in tmp108_attr_get() 210 if (val->val1 < 1) { in tmp108_attr_set() 212 } else if (val->val1 < 2) { in tmp108_attr_set() 214 } else if (val->val1 < 4) { in tmp108_attr_set() 227 if (val->val1 == 1) { in tmp108_attr_set() 239 uval = val->val1 * 1000000 + val->val2; in tmp108_attr_set() 247 uval = val->val1 * 1000000 + val->val2; in tmp108_attr_set() 255 if (val->val1 < 1) { in tmp108_attr_set() 257 } else if (val->val1 < 4) { in tmp108_attr_set() [all …]
|
/Zephyr-latest/drivers/sensor/sensirion/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-latest/samples/sensor/tmp112/src/ |
D | main.c | 19 attr.val1 = 150; in do_main() 28 attr.val1 = 8; in do_main() 50 printk("temp is %d (%d micro)\n", temp_value.val1, in do_main()
|
/Zephyr-latest/samples/sensor/vcnl4040/src/ |
D | main.c | 29 printf("Proximity: %d\n", (uint16_t) pdata.val1); in print_proxy_data() 41 printf("Light (lux): %d\n", (uint16_t) val.val1); in print_als_data() 94 attr.val1 = 127; in test_trigger_mode() 103 attr.val1 = 122; in test_trigger_mode()
|
/Zephyr-latest/samples/sensor/sensor_shell/src/ |
D | fake_sensor.c | 26 val->val1, val->val2); in attr_set() 36 val->val1 = chan; in attr_get() 62 val->val1 = chan; in channel_get() 67 val->val1 = chan; in channel_get()
|
/Zephyr-latest/drivers/sensor/nordic/npm1300_charger/ |
D | npm1300_charger.c | 162 valp->val1 = (int32_t)temp; in calc_temp() 173 valp->val1 = temp / 1000; in calc_dietemp() 217 valp->val1 = current / 1000; in calc_current() 231 valp->val1 = tmp / 1000; in npm1300_charger_channel_get() 244 valp->val1 = data->status; in npm1300_charger_channel_get() 248 valp->val1 = data->error; in npm1300_charger_channel_get() 252 valp->val1 = config->current_microamp / 1000000; in npm1300_charger_channel_get() 256 valp->val1 = config->dischg_limit_microamp / 1000000; in npm1300_charger_channel_get() 263 valp->val1 = data->vbus_stat; in npm1300_charger_channel_get() 385 val->val1 = data; in npm1300_charger_attr_get() [all …]
|
/Zephyr-latest/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-latest/samples/sensor/apds9960/src/ |
D | main.c | 41 .val1 = 127, in main() 77 intensity.val1, pdata.val1); in main()
|
/Zephyr-latest/drivers/sensor/maxim/max17262/ |
D | max17262.c | 70 val->val1 = val_millis / 1000; in convert_millis() 95 valp->val1 = tmp / 1000000; in max17262_channel_get() 103 valp->val1 = current / 1000000; in max17262_channel_get() 108 valp->val1 = data->state_of_charge / 256; in max17262_channel_get() 112 valp->val1 = data->internal_temp / 256; in max17262_channel_get() 124 valp->val1 = 0; in max17262_channel_get() 134 valp->val1 = 0; in max17262_channel_get() 142 valp->val1 = data->cycle_count / 100; in max17262_channel_get() 155 valp->val1 = data->ichg_term; in max17262_channel_get() 161 valp->val1 = data->coulomb_counter / 2; in max17262_channel_get()
|
/Zephyr-latest/drivers/sensor/maxim/max31855/ |
D | max31855.c | 81 val->val1 = temp / 100; in max31855_channel_get() 82 val->val2 = (temp - val->val1 * 100) * 10000; in max31855_channel_get() 95 val->val1 = temp / 10000; in max31855_channel_get() 96 val->val2 = (temp - val->val1 * 10000) * 100; in max31855_channel_get()
|
/Zephyr-latest/samples/sensor/ams_iAQcore/src/ |
D | main.c | 30 co2.val1, co2.val2, in main() 31 voc.val1, voc.val2); in main()
|
/Zephyr-latest/include/zephyr/drivers/sensor/ |
D | w1_sensor.h | 46 val->val1 = sys_get_be64((uint8_t *)rom) & BIT64_MASK(32); in w1_rom_to_sensor_value() 60 | (uint32_t)val->val1; in w1_sensor_value_to_rom()
|
/Zephyr-latest/samples/shields/x_nucleo_iks4a1/standard/src/ |
D | main.c | 73 odr_attr.val1 = 100; in lis2mdl_config() 95 mode_attr.val1 = 0; /* HP */ in lsm6dso16is_config() 104 odr_attr.val1 = 208; in lsm6dso16is_config() 122 odr_attr.val1 = 208; in lsm6dso16is_config() 152 mode_attr.val1 = 0; /* HP */ in lsm6dsv16x_config() 161 odr_attr.val1 = 208; in lsm6dsv16x_config() 179 odr_attr.val1 = 208; in lsm6dsv16x_config() 210 odr_attr.val1 = 10; in lps22df_config() 233 odr_attr.val1 = 200; in lis2duxs12_config()
|
/Zephyr-latest/drivers/sensor/ams/ccs811/ |
D | ccs811_trigger.c | 33 if ((thr->val1 >= CCS811_CO2_MIN_PPM) in ccs811_attr_set() 34 && (thr->val1 <= CCS811_CO2_MAX_PPM)) { in ccs811_attr_set() 35 drv_data->co2_l2m = thr->val1; in ccs811_attr_set() 40 if ((thr->val1 >= CCS811_CO2_MIN_PPM) in ccs811_attr_set() 41 && (thr->val1 <= CCS811_CO2_MAX_PPM)) { in ccs811_attr_set() 42 drv_data->co2_m2h = thr->val1; in ccs811_attr_set()
|
/Zephyr-latest/drivers/sensor/aosong/dht/ |
D | dht.c | 195 val->val1 = raw_val / 10; in dht_channel_get() 204 val->val1 = raw_val / 10; in dht_channel_get() 209 val->val1 = -val->val1; in dht_channel_get() 218 val->val1 = drv_data->sample[0]; in dht_channel_get() 221 val->val1 = drv_data->sample[2]; in dht_channel_get()
|
/Zephyr-latest/include/zephyr/drivers/ |
D | sensor.h | 53 int32_t val1; member 1187 int64_t micro_ms2 = ms2->val1 * 1000000LL + ms2->val2; in sensor_ms2_to_g() 1204 ms2->val1 = ((int64_t)g * SENSOR_G) / 1000000LL; in sensor_g_to_ms2() 1218 int64_t micro_ms2 = (ms2->val1 * INT64_C(1000000)) + ms2->val2; in sensor_ms2_to_ug() 1231 ms2->val1 = ((int64_t)ug * SENSOR_G / 1000000LL) / 1000000LL; in sensor_ug_to_ms2() 1244 int64_t micro_rad_s = rad->val1 * 1000000LL + rad->val2; in sensor_rad_to_degrees() 1261 rad->val1 = ((int64_t)d * SENSOR_PI / 180LL) / 1000000LL; in sensor_degrees_to_rad() 1278 int64_t micro_rad_s = rad->val1 * 1000000LL + rad->val2; in sensor_rad_to_10udegrees() 1291 rad->val1 = ((int64_t)d * SENSOR_PI / 180LL / 100000LL) / 1000000LL; in sensor_10udegrees_to_rad() 1303 return (double)val->val1 + (double)val->val2 / 1000000; in sensor_value_to_double() [all …]
|
/Zephyr-latest/samples/sensor/jc42/src/ |
D | main.c | 46 const int temp_ucel = temp->val1 * UCEL_PER_CEL + temp->val2; in set_window() 50 .val1 = low_ucel / UCEL_PER_CEL, in set_window() 56 val.val1 = high_ucel / UCEL_PER_CEL, in set_window() 75 .val1 = temp_ucel / UCEL_PER_CEL, in set_window_ucel()
|