Merge branch 'bugfix/adc2_cal_assert_arbiter_failed_v4.4' into 'release/v4.4'

adc_cal: fixed the assertion failure or returning wrong error code when ADC2 failed the arbitration (v4.4)

See merge request espressif/esp-idf!17586
pull/8934/head
Michael (XIAO Xufeng) 2022-04-25 10:14:12 +08:00
commit 69a3bdacb0
3 zmienionych plików z 5 dodań i 3 usunięć

Wyświetl plik

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2020-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -34,7 +34,10 @@ esp_err_t esp_adc_cal_get_voltage(adc_channel_t channel,
ESP_RETURN_ON_FALSE(channel < SOC_ADC_CHANNEL_NUM(1), ESP_ERR_INVALID_ARG, TAG, "Invalid channel");
ret = adc2_get_raw(channel, chars->bit_width, &adc_reading);
}
*voltage = esp_adc_cal_raw_to_voltage((uint32_t)adc_reading, chars);
if (ret == ESP_OK) {
*voltage = esp_adc_cal_raw_to_voltage((uint32_t)adc_reading, chars);
}
return ret;
}

Wyświetl plik

@ -63,7 +63,6 @@ if(NOT BOOTLOADER_BUILD)
"usb_hal.c"
"usb_phy_hal.c"
"xt_wdt_hal.c"
"esp32s2/adc_hal.c"
"esp32s2/brownout_hal.c"
"esp32s2/cp_dma_hal.c"
"esp32s2/touch_sensor_hal.c"