Home
last modified time | relevance | path

Searched refs:val_mv (Results 1 – 11 of 11) sorted by relevance

/Zephyr-latest/samples/boards/st/power_mgmt/adc/src/
Dmain.c59 int32_t val_mv; in main() local
79 val_mv = (int32_t)((int16_t)buf); in main()
81 val_mv = (int32_t)buf; in main()
83 printk("%"PRId32, val_mv); in main()
85 &val_mv); in main()
90 printk(" = %"PRId32" mV\n", val_mv); in main()
/Zephyr-latest/samples/drivers/adc/adc_dt/src/
Dmain.c64 int32_t val_mv; local
84 val_mv = (int32_t)((int16_t)buf);
86 val_mv = (int32_t)buf;
88 printk("%"PRId32, val_mv);
90 &val_mv);
95 printk(" = %"PRId32" mV\n", val_mv);
/Zephyr-latest/samples/drivers/adc/adc_sequence/src/
Dmain.c83 int32_t val_mv; local
91 val_mv = channel_reading[sample_index][channel_index];
93 printf("- - %" PRId32, val_mv);
96 CONFIG_SEQUENCE_RESOLUTION, &val_mv);
102 printf(" = %" PRId32 "mV\n", val_mv);
/Zephyr-latest/tests/drivers/regulator/voltage/src/
Dmain.c64 int32_t val_mv = 0; in ZTEST() local
89 val_mv += buf; in ZTEST()
92 val_mv /= (int32_t)adc_avg_count; in ZTEST()
94 ret = adc_raw_to_millivolts_dt(&adc_chs[i], &val_mv); in ZTEST()
98 val_mv * 1000); in ZTEST()
100 zassert_between_inclusive(val_mv * 1000, in ZTEST()
/Zephyr-latest/samples/boards/st/power_mgmt/suspend_to_ram/src/
Dmain.c156 int32_t val_mv; in adc_test() local
176 val_mv = (int32_t)((int16_t)buf); in adc_test()
178 val_mv = (int32_t)buf; in adc_test()
180 printk("%"PRId32, val_mv); in adc_test()
182 &val_mv); in adc_test()
187 printk(" = %"PRId32" mV\n", val_mv); in adc_test()
/Zephyr-latest/include/zephyr/drivers/adc/
Dadc_npcx_threshold.h51 int adc_npcx_threshold_mv_to_thrval(const struct device *dev, uint32_t val_mv,
/Zephyr-latest/drivers/sensor/ntc_thermistor/
Dntc_thermistor.c52 int32_t val_mv = data->raw; in ntc_thermistor_sample_fetch() local
54 res = adc_raw_to_millivolts_dt(&cfg->adc_channel, &val_mv); in ntc_thermistor_sample_fetch()
55 data->sample_val = val_mv; in ntc_thermistor_sample_fetch()
/Zephyr-latest/drivers/adc/
Dadc_esp32.c108 static void atten_to_gain(adc_atten_t atten, uint32_t *val_mv) in atten_to_gain() argument
110 if (!val_mv) { in atten_to_gain()
115 *val_mv = (*val_mv * 4) / 5; /* 1/ADC_GAIN_4_5 */ in atten_to_gain()
118 *val_mv = *val_mv >> 1; /* 1/ADC_GAIN_1_2 */ in atten_to_gain()
121 *val_mv = *val_mv / 4; /* 1/ADC_GAIN_1_4 */ in atten_to_gain()
Dadc_npcx.c728 int adc_npcx_threshold_mv_to_thrval(const struct device *dev, uint32_t val_mv, in adc_npcx_threshold_mv_to_thrval() argument
737 if (val_mv >= api->ref_internal) { in adc_npcx_threshold_mv_to_thrval()
741 *thrval = (val_mv << ADC_NPCX_THRVAL_RESOLUTION) / in adc_npcx_threshold_mv_to_thrval()
/Zephyr-latest/drivers/sensor/nordic/npm2100_vbat/
Dnpm2100_vbat.c316 int32_t val_mv; in npm2100_vbat_attr_get() local
328 ret = linear_range_get_value(npm2100_attr[idx].range, reg_data, &val_mv); in npm2100_vbat_attr_get()
333 val->val1 = val_mv / 1000000; in npm2100_vbat_attr_get()
334 val->val2 = val_mv % 1000000; in npm2100_vbat_attr_get()
/Zephyr-latest/drivers/sensor/maxim/max17055/
Dmax17055.c121 static int max17055_update_vempty(uint16_t *v_empty, uint16_t val_mv) in max17055_update_vempty() argument
123 uint32_t val = (val_mv / 10) << 7; in max17055_update_vempty()