/hal_espressif-3.7.0/components/esp_adc/deprecated/esp32/ |
D | esp_adc_cal_legacy.c | 226 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/ |
D | esp_adc_cal.c | 232 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/ |
D | esp_adc_cal_common_legacy.c | 34 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/ |
D | esp_adc_cal_legacy.c | 158 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/ |
D | esp_adc_cal.c | 170 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/ |
D | esp_adc_cal_legacy.c | 161 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/ |
D | esp_adc_cal.h | 86 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/ |
D | esp_adc_cal.h | 108 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/ |
D | esp_adc_cal_legacy.c | 197 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/ |
D | esp_adc_cal.c | 195 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/ |
D | adc_cali_line_fitting.c | 126 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()
|