Home
last modified time | relevance | path

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

/hal_espressif-3.7.0/components/esp_adc/deprecated/esp32/
Desp_adc_cal_legacy.c226 static uint32_t calculate_voltage_linear(uint32_t adc_reading, uint32_t coeff_a, uint32_t coeff_b) in calculate_voltage_linear() argument
229 return (((coeff_a * adc_reading) + LIN_COEFF_A_ROUND) / LIN_COEFF_A_SCALE) + coeff_b; in calculate_voltage_linear()
325 uint32_t esp_adc_cal_raw_to_voltage(uint32_t adc_reading, const esp_adc_cal_characteristics_t *char… in esp_adc_cal_raw_to_voltage() argument
330 adc_reading = (adc_reading << (ADC_WIDTH_BIT_12 - chars->bit_width)); in esp_adc_cal_raw_to_voltage()
331 if (adc_reading > ADC_12_BIT_RES - 1) { in esp_adc_cal_raw_to_voltage()
332 adc_reading = ADC_12_BIT_RES - 1; //Set to 12bit res max in esp_adc_cal_raw_to_voltage()
335 …if (LUT_ENABLED && (chars->atten == ADC_ATTEN_DB_11) && (adc_reading >= LUT_LOW_THRESH)) { //Chec… in esp_adc_cal_raw_to_voltage()
337 …uint32_t lut_voltage = calculate_voltage_lut(adc_reading, chars->vref, chars->low_curve, chars->hi… in esp_adc_cal_raw_to_voltage()
338 …if (adc_reading <= LUT_HIGH_THRESH) { //If ADC is transitioning from linear region to non-linear… in esp_adc_cal_raw_to_voltage()
340 … uint32_t linear_voltage = calculate_voltage_linear(adc_reading, chars->coeff_a, chars->coeff_b); in esp_adc_cal_raw_to_voltage()
[all …]
/hal_espressif-3.7.0/zephyr/esp32/src/esp_adc_cal/
Desp_adc_cal.c232 static uint32_t calculate_voltage_linear(uint32_t adc_reading, uint32_t coeff_a, uint32_t coeff_b) in calculate_voltage_linear() argument
235 return (((coeff_a * adc_reading) + LIN_COEFF_A_ROUND) / LIN_COEFF_A_SCALE) + coeff_b; in calculate_voltage_linear()
331 uint32_t esp_adc_cal_raw_to_voltage(uint32_t adc_reading, const esp_adc_cal_characteristics_t *char… in esp_adc_cal_raw_to_voltage() argument
336 adc_reading = (adc_reading << (ADC_WIDTH_BIT_12 - chars->bit_width)); in esp_adc_cal_raw_to_voltage()
337 if (adc_reading > ADC_12_BIT_RES - 1) { in esp_adc_cal_raw_to_voltage()
338 adc_reading = ADC_12_BIT_RES - 1; //Set to 12bit res max in esp_adc_cal_raw_to_voltage()
341 …if (LUT_ENABLED && (chars->atten == ADC_ATTEN_DB_11) && (adc_reading >= LUT_LOW_THRESH)) { //Chec… in esp_adc_cal_raw_to_voltage()
343 …uint32_t lut_voltage = calculate_voltage_lut(adc_reading, chars->vref, chars->low_curve, chars->hi… in esp_adc_cal_raw_to_voltage()
344 …if (adc_reading <= LUT_HIGH_THRESH) { //If ADC is transitioning from linear region to non-linear… in esp_adc_cal_raw_to_voltage()
346 … uint32_t linear_voltage = calculate_voltage_linear(adc_reading, chars->coeff_a, chars->coeff_b); in esp_adc_cal_raw_to_voltage()
[all …]
/hal_espressif-3.7.0/components/esp_adc/deprecated/
Desp_adc_cal_common_legacy.c34 int adc_reading; in esp_adc_cal_get_voltage() local
37 adc_reading = adc1_get_raw(channel); in esp_adc_cal_get_voltage()
40 ret = adc2_get_raw(channel, chars->bit_width, &adc_reading); in esp_adc_cal_get_voltage()
44 *voltage = esp_adc_cal_raw_to_voltage((uint32_t)adc_reading, chars); in esp_adc_cal_get_voltage()
/hal_espressif-3.7.0/components/esp_adc/deprecated/esp32s3/
Desp_adc_cal_legacy.c158 uint32_t esp_adc_cal_raw_to_voltage(uint32_t adc_reading, const esp_adc_cal_characteristics_t *char… in esp_adc_cal_raw_to_voltage() argument
163 assert(adc_reading < 4096); in esp_adc_cal_raw_to_voltage()
170 v_cali_1 = (uint64_t)adc_reading * chars->coeff_a; in esp_adc_cal_raw_to_voltage()
/hal_espressif-3.7.0/zephyr/esp32c3/src/esp_adc_cal/
Desp_adc_cal.c170 uint32_t esp_adc_cal_raw_to_voltage(uint32_t adc_reading, const esp_adc_cal_characteristics_t *char… in esp_adc_cal_raw_to_voltage() argument
175 uint64_t v_cali_1 = adc_reading * chars->coeff_a / coeff_a_scaling; in esp_adc_cal_raw_to_voltage()
/hal_espressif-3.7.0/components/esp_adc/deprecated/esp32c3/
Desp_adc_cal_legacy.c161 uint32_t esp_adc_cal_raw_to_voltage(uint32_t adc_reading, const esp_adc_cal_characteristics_t *char… in esp_adc_cal_raw_to_voltage() argument
166 uint64_t v_cali_1 = (uint64_t)adc_reading * chars->coeff_a / coeff_a_scaling; in esp_adc_cal_raw_to_voltage()
/hal_espressif-3.7.0/components/esp_adc/deprecated/include/
Desp_adc_cal.h86 uint32_t esp_adc_cal_raw_to_voltage(uint32_t adc_reading, const esp_adc_cal_characteristics_t *char…
/hal_espressif-3.7.0/zephyr/port/include/
Desp_adc_cal.h108 uint32_t esp_adc_cal_raw_to_voltage(uint32_t adc_reading, const esp_adc_cal_characteristics_t *char…
/hal_espressif-3.7.0/components/esp_adc/deprecated/esp32s2/
Desp_adc_cal_legacy.c197 uint32_t esp_adc_cal_raw_to_voltage(uint32_t adc_reading, const esp_adc_cal_characteristics_t *char… in esp_adc_cal_raw_to_voltage() argument
200 return adc_reading * chars->coeff_a / coeff_a_scaling + chars->coeff_b / coeff_b_scaling; in esp_adc_cal_raw_to_voltage()
/hal_espressif-3.7.0/zephyr/esp32s2/src/esp_adc_cal/
Desp_adc_cal.c195 uint32_t esp_adc_cal_raw_to_voltage(uint32_t adc_reading, const esp_adc_cal_characteristics_t *char… in esp_adc_cal_raw_to_voltage() argument
198 return adc_reading * chars->coeff_a / coeff_a_scaling + chars->coeff_b / coeff_b_scaling; in esp_adc_cal_raw_to_voltage()
/hal_espressif-3.7.0/components/esp_adc/esp32/
Dadc_cali_line_fitting.c126 static uint32_t calculate_voltage_linear(uint32_t adc_reading, uint32_t coeff_a, uint32_t coeff_b);
405 static uint32_t calculate_voltage_linear(uint32_t adc_reading, uint32_t coeff_a, uint32_t coeff_b) in calculate_voltage_linear() argument
408 return (((coeff_a * adc_reading) + LIN_COEFF_A_ROUND) / LIN_COEFF_A_SCALE) + coeff_b; in calculate_voltage_linear()