mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-17 23:41:55 +00:00
Add regi2c enable/disable reference count
This commit is contained in:
@@ -65,7 +65,7 @@ static inline __attribute__((always_inline)) bool regi2c_ctrl_ll_bbpll_calibrati
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Enable I2C_SAR
|
||||
* @brief Enable the I2C internal bus to do I2C read/write operation to the SAR_ADC register
|
||||
*/
|
||||
static inline void regi2c_ctrl_ll_i2c_saradc_enable(void)
|
||||
{
|
||||
@@ -73,6 +73,15 @@ static inline void regi2c_ctrl_ll_i2c_saradc_enable(void)
|
||||
SET_PERI_REG_MASK(ANA_CONFIG2_REG, ANA_I2C_SAR_FORCE_PU);
|
||||
}
|
||||
|
||||
/**
|
||||
* @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)
|
||||
{
|
||||
CLEAR_PERI_REG_MASK(ANA_CONFIG_REG, ANA_I2C_SAR_FORCE_PU);
|
||||
SET_PERI_REG_MASK(ANA_CONFIG2_REG, ANA_I2C_SAR_FORCE_PD);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user