diff --git a/components/hal/esp32h2/include/hal/regi2c_ctrl_ll.h b/components/hal/esp32h2/include/hal/regi2c_ctrl_ll.h index 7c35b6eafc..31cc40b6ae 100644 --- a/components/hal/esp32h2/include/hal/regi2c_ctrl_ll.h +++ b/components/hal/esp32h2/include/hal/regi2c_ctrl_ll.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -11,6 +11,7 @@ #include "soc/soc.h" #include "soc/regi2c_defs.h" #include "soc/i2c_ana_mst_reg.h" +#include "soc/pmu_reg.h" #include "modem/modem_lpcon_struct.h" #ifdef __cplusplus @@ -112,6 +113,22 @@ static inline void regi2c_ctrl_ll_i2c_saradc_disable(void) SET_PERI_REG_MASK(I2C_MST_ANA_CONF2_REG, ANA_I2C_SAR_FORCE_PD); } +/** + * @brief Enable regi2c controlled periph registers + */ +static inline void regi2c_ctrl_ll_i2c_periph_enable(void) +{ + SET_PERI_REG_MASK(PMU_RF_PWC_REG, PMU_XPD_PERIF_I2C); +} + +/** + * @brief Disable regi2c controlled periph registers + */ +static inline void regi2c_ctrl_ll_i2c_periph_disable(void) +{ + CLEAR_PERI_REG_MASK(PMU_RF_PWC_REG, PMU_XPD_PERIF_I2C); +} + #ifdef __cplusplus } #endif