fix(adc): fix adc do not enable/disable regi2c registers

This commit is contained in:
gaoxu
2025-04-25 14:39:01 +08:00
parent d6fb99b5ad
commit bf335a38f7
38 changed files with 215 additions and 366 deletions

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -40,9 +40,9 @@ static inline __attribute__((always_inline)) void regi2c_ctrl_ll_bbpll_calibrati
}
/**
* @brief Enable the I2C internal bus to do I2C read/write operation to the SAR_ADC register
* @brief Enable the I2C internal bus to do I2C read/write operation to the SAR_ADC and TSENS registers
*/
static inline void regi2c_ctrl_ll_i2c_saradc_enable(void)
static inline void regi2c_ctrl_ll_i2c_sar_periph_enable(void)
{
CLEAR_PERI_REG_MASK(ANA_CONFIG_REG, ANA_I2C_SAR_FORCE_PD);
SET_PERI_REG_MASK(ANA_CONFIG2_REG, ANA_I2C_SAR_FORCE_PU);
@@ -51,7 +51,7 @@ static inline void regi2c_ctrl_ll_i2c_saradc_enable(void)
/**
* @brief Disable the I2C internal bus to do I2C read/write operation to the SAR_ADC register
*/
static inline void regi2c_ctrl_ll_i2c_saradc_disable(void)
static inline void regi2c_ctrl_ll_i2c_sar_periph_disable(void)
{
CLEAR_PERI_REG_MASK(ANA_CONFIG_REG, ANA_I2C_SAR_FORCE_PU);
SET_PERI_REG_MASK(ANA_CONFIG2_REG, ANA_I2C_SAR_FORCE_PD);