mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-14 22:16:46 +00:00
Merge branch 'bugfix/bunch_tsens_v5.2' into 'release/v5.2'
fix(temperature_sensor): Fix the value is incorrect if disable and enable again (backport v5.2) See merge request espressif/esp-idf!28626
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2016-2023 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2016-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -238,10 +238,7 @@ esp_err_t adc_continuous_new_handle(const adc_continuous_handle_cfg_t *hdl_confi
|
||||
adc_ctx->fsm = ADC_FSM_INIT;
|
||||
*ret_handle = adc_ctx;
|
||||
|
||||
//enable ADC digital part
|
||||
periph_module_enable(PERIPH_SARADC_MODULE);
|
||||
//reset ADC digital part
|
||||
periph_module_reset(PERIPH_SARADC_MODULE);
|
||||
adc_apb_periph_claim();
|
||||
|
||||
#if SOC_ADC_CALIBRATION_V1_SUPPORTED
|
||||
adc_hal_calibration_init(ADC_UNIT_1);
|
||||
@@ -500,7 +497,7 @@ esp_err_t adc_continuous_deinit(adc_continuous_handle_t handle)
|
||||
free(handle);
|
||||
handle = NULL;
|
||||
|
||||
periph_module_disable(PERIPH_SARADC_MODULE);
|
||||
adc_apb_periph_free();
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
|
Reference in New Issue
Block a user