/Zephyr-Core-3.6.0/drivers/sensor/mcux_acmp/ |
D | mcux_acmp.c | 83 int32_t val1; in mcux_acmp_attr_set() local 94 val1 = val->val1; in mcux_acmp_attr_set() 99 if (val1 >= kACMP_OffsetLevel0 && in mcux_acmp_attr_set() 100 val1 <= kACMP_OffsetLevel1) { in mcux_acmp_attr_set() 101 LOG_DBG("offset = %d", val1); in mcux_acmp_attr_set() 102 data->config.offsetMode = val1; in mcux_acmp_attr_set() 111 if (val1 >= kACMP_HysteresisLevel0 && in mcux_acmp_attr_set() 112 val1 <= kACMP_HysteresisLevel3) { in mcux_acmp_attr_set() 113 LOG_DBG("hysteresis = %d", val1); in mcux_acmp_attr_set() 114 data->config.hysteresisMode = val1; in mcux_acmp_attr_set() [all …]
|
/Zephyr-Core-3.6.0/drivers/sensor/ |
D | shell_battery.c | 91 shell_fprintf(sh, SHELL_NORMAL, "Temp: %.1d.%02d C\n", temp.val1, in cmd_battery() 93 shell_fprintf(sh, 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(sh, 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(sh, SHELL_NORMAL, "Charge: %d %%\n", charge.val1); in cmd_battery() 111 v_design.val1, v_design.val2 / 10000); in cmd_battery() [all …]
|
/Zephyr-Core-3.6.0/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-3.6.0/samples/sensor/bmi270/src/ |
D | main.c | 28 full_scale.val1 = 2; /* G */ in main() 30 sampling_freq.val1 = 100; /* Hz. Performance mode */ in main() 32 oversampling.val1 = 1; /* Normal mode */ in main() 49 full_scale.val1 = 500; /* dps */ in main() 51 sampling_freq.val1 = 100; /* Hz. Performance mode */ in main() 53 oversampling.val1 = 1; /* Normal mode */ in main() 79 acc[0].val1, acc[0].val2, in main() 80 acc[1].val1, acc[1].val2, in main() 81 acc[2].val1, acc[2].val2, in main() 82 gyr[0].val1, gyr[0].val2, in main() [all …]
|
/Zephyr-Core-3.6.0/tests/drivers/sensor/generic/src/ |
D | main.c | 120 zassert_equal(data.val1, chan_elements[0].data.val1, in ZTEST() 132 zassert_equal(data.val1, chan_elements[i].data.val1, in ZTEST() 220 zassert_equal(trigger_elements[i].data.val1, in ZTEST() 221 data.val1, "read-back returned wrong val1"); in ZTEST() 238 zassert_equal(data.val1, trigger_elements[i].data.val1, in ZTEST() 280 zassert_equal(data.val1, SENSOR_G/1000000LL, in ZTEST() 282 zassert_equal(data.val2, SENSOR_G%(data.val1 * 1000000LL), in ZTEST() 287 data.val1 = -data.val1; in ZTEST() 294 zassert_equal(data.val1, SENSOR_PI/1000000LL, in ZTEST() 296 zassert_equal(data.val2, SENSOR_PI%(data.val1 * 1000000LL), in ZTEST() [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-3.6.0/drivers/sensor/akm09918c/ |
D | akm09918c.h | 45 if (val->val1 >= 100) { in akm09918c_hz_to_reg() 47 } else if (val->val1 >= 50) { in akm09918c_hz_to_reg() 49 } else if (val->val1 >= 20) { in akm09918c_hz_to_reg() 51 } else if (val->val1 > 0) { in akm09918c_hz_to_reg() 60 val->val1 = 0; in akm09918c_reg_to_hz() 64 val->val1 = 10; in akm09918c_reg_to_hz() 67 val->val1 = 20; in akm09918c_reg_to_hz() 70 val->val1 = 50; in akm09918c_reg_to_hz() 73 val->val1 = 100; in akm09918c_reg_to_hz()
|
/Zephyr-Core-3.6.0/samples/sensor/mhz19b/src/ |
D | main.c | 28 val.val1 = 5000; in main() 31 printk("failed to set range to %d\n", val.val1); in main() 35 val.val1 = 1; in main() 38 printk("failed to set ABC to %d\n", val.val1); in main() 52 printk("Sensor range is set to %dppm\n", val.val1); in main() 60 printk("Sensor ABC is %s\n", val.val1 == 1 ? "enabled" : "disabled"); in main() 73 printk("sensor: co2 reading: %d\n", val.val1); in main()
|
/Zephyr-Core-3.6.0/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-3.6.0/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-3.6.0/samples/sensor/grow_r502a/src/ |
D | main.c | 27 printk("Matched ID : %d\n", input.val1); in finger_match() 38 printk("Fingerprint successfully stored at #%d\n", fid.val1); in finger_enroll() 57 printk("template count : %d\n", val.val1); in template_count_get() 90 del.val1 = 3; in main() 96 printk("Fingerprint Deleted at ID #%d\n", del.val1); in main() 104 printk("Fingerprint template free idx at ID #%d\n", fid_get.val1); in main() 106 fid.val1 = fid_get.val1; in main() 108 "Place your finger\n", fid.val1); in main()
|
/Zephyr-Core-3.6.0/drivers/sensor/icm42688/ |
D | icm42688.h | 200 out->val1 = 32000; in icm42688_accel_reg_to_hz() 204 out->val1 = 1600; in icm42688_accel_reg_to_hz() 208 out->val1 = 8000; in icm42688_accel_reg_to_hz() 212 out->val1 = 4000; in icm42688_accel_reg_to_hz() 216 out->val1 = 2000; in icm42688_accel_reg_to_hz() 220 out->val1 = 1000; in icm42688_accel_reg_to_hz() 224 out->val1 = 500; in icm42688_accel_reg_to_hz() 228 out->val1 = 200; in icm42688_accel_reg_to_hz() 232 out->val1 = 100; in icm42688_accel_reg_to_hz() 236 out->val1 = 50; in icm42688_accel_reg_to_hz() [all …]
|
/Zephyr-Core-3.6.0/subsys/net/lib/lwm2m/ |
D | lwm2m_util.c | 27 int32_t val1 = (int32_t)*in; in lwm2m_float_to_b32() local 36 if (val1 == 0 && val2 == 0) { in lwm2m_float_to_b32() 42 v = abs(val1); in lwm2m_float_to_b32() 85 if (val1 == 0) { in lwm2m_float_to_b32() 88 b32[0] = val1 < 0 ? 0x80 : 0; in lwm2m_float_to_b32() 109 int64_t val1 = (int64_t)*in; in lwm2m_float_to_b64() local 118 if (val1 == 0 && val2 == 0) { in lwm2m_float_to_b64() 124 v = llabs(val1); in lwm2m_float_to_b64() 167 if (val1 == 0) { in lwm2m_float_to_b64() 170 b64[0] = val1 < 0 ? 0x80 : 0; in lwm2m_float_to_b64() [all …]
|
/Zephyr-Core-3.6.0/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() 268 if (val->val1 > 8000 || val->val1 < 1) { in icm42605_attr_set() 272 drv_data->accel_hz = val->val1; in icm42605_attr_set() 275 if (val->val1 < ACCEL_FS_16G || in icm42605_attr_set() 276 val->val1 > ACCEL_FS_2G) { in icm42605_attr_set() 280 drv_data->accel_sf = val->val1; in icm42605_attr_set() [all …]
|
/Zephyr-Core-3.6.0/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-3.6.0/samples/sensor/bme680/src/ |
D | main.c | 34 temp.val1, temp.val2, press.val1, press.val2, in main() 35 humidity.val1, humidity.val2, gas_res.val1, in main()
|
/Zephyr-Core-3.6.0/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-3.6.0/samples/shields/npm1300_ek/src/ |
D | main.c | 91 printk("V: %d.%03d ", volt.val1, volt.val2 / 1000); in read_sensors() 93 printk("I: %s%d.%04d ", ((current.val1 < 0) || (current.val2 < 0)) ? "-" : "", in read_sensors() 94 abs(current.val1), abs(current.val2) / 100); in read_sensors() 96 printk("T: %s%d.%02d\n", ((temp.val1 < 0) || (temp.val2 < 0)) ? "-" : "", abs(temp.val1), in read_sensors() 99 printk("Charger Status: %d, Error: %d\n", status.val1, error.val1); in read_sensors()
|
/Zephyr-Core-3.6.0/drivers/sensor/veml7700/ |
D | veml7700.c | 152 return val->val1 >= VEML7700_ALS_GAIN_1 in veml7700_check_gain() 153 && val->val1 <= VEML7700_ALS_GAIN_1_4; in veml7700_check_gain() 158 return val->val1 >= VEML7700_ALS_IT_25 in veml7700_check_it() 159 && val->val1 <= VEML7700_ALS_IT_800; in veml7700_check_it() 164 return (val->val1 >= VEML7700_ALS_PERS_1 in veml7700_check_int_mode() 165 && val->val1 <= VEML7700_ALS_PERS_8) in veml7700_check_int_mode() 166 || val->val1 == VEML7700_INT_DISABLED; in veml7700_check_int_mode() 344 data->thresh_low = veml7700_lux_to_counts(data, val->val1); in veml7700_attr_set() 347 data->thresh_high = veml7700_lux_to_counts(data, val->val1); in veml7700_attr_set() 351 data->gain = (enum veml7700_als_gain)val->val1; in veml7700_attr_set() [all …]
|
/Zephyr-Core-3.6.0/drivers/sensor/bmi323/ |
D | bmi323.c | 107 result->val1 = int_part; in bosch_bmi323_value_to_sensor_value() 116 result->val1 = int_part; in bosch_bmi323_sensor_value_from_micro() 280 if (val->val1) { in bosch_bmi323_driver_api_set_acc_feature_mask() 384 if (val->val1) { in bosch_bmi323_driver_api_set_gyro_feature_mask() 477 val->val1 = 0; in bosch_bmi323_driver_api_get_acc_odr() 481 val->val1 = 1; in bosch_bmi323_driver_api_get_acc_odr() 485 val->val1 = 3; in bosch_bmi323_driver_api_get_acc_odr() 489 val->val1 = 6; in bosch_bmi323_driver_api_get_acc_odr() 493 val->val1 = 12; in bosch_bmi323_driver_api_get_acc_odr() 497 val->val1 = 25; in bosch_bmi323_driver_api_get_acc_odr() [all …]
|
/Zephyr-Core-3.6.0/samples/sensor/max17262/src/ |
D | main.c | 31 i_avg = avg_current.val1 + (avg_current.val2 / 1000000.0); in main() 34 voltage.val1, voltage.val2, (double)i_avg, in main() 35 temperature.val1, temperature.val2); in main()
|
/Zephyr-Core-3.6.0/samples/sensor/fxos8700-hid/src/ |
D | main.c | 132 LOG_DBG("int parts: X %d Y %d", val[0].val1, val[1].val1); in read_accel() 136 if (val[0].val1 != 0) { in read_accel() 137 status[MOUSE_X_REPORT_POS] = val[0].val1 * 4; in read_accel() 140 if (val[1].val1 != 0) { in read_accel() 141 status[MOUSE_Y_REPORT_POS] = val[1].val1 * 4; in read_accel() 144 if (val[0].val1 != 0 || val[1].val1 != 0) { in read_accel() 207 .val1 = 6, in main()
|
/Zephyr-Core-3.6.0/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-3.6.0/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-3.6.0/drivers/sensor/wsen_hids/ |
D | wsen_hids.c | 25 {.val1 = 0, .val2 = 0}, 26 {.val1 = 1, .val2 = 0}, 27 {.val1 = 7, .val2 = 0}, 28 {.val1 = 12, .val2 = 5 * 100000}, 69 value->val1 = value_converted / 100; in hids_channel_get() 75 value->val1 = value_converted / 100; in hids_channel_get() 91 if (odr->val1 == hids_odr_list[odr_index].val1 && in hids_odr_set() 99 LOG_ERR("Bad sampling frequency %d.%d", odr->val1, odr->val2); in hids_odr_set()
|