mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
refactor(esp_hal_regi2c): move regi2c implementation from esp_rom to esp_hal_regi2c
This commit is contained in:
@@ -351,6 +351,32 @@ static inline __attribute__((always_inline)) void clk_ll_cpll_set_config(uint32_
|
||||
// TODO: [ESP32S31] IDF-14733
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Start CPLL self-calibration
|
||||
*/
|
||||
static inline __attribute__((always_inline)) void clk_ll_cpll_calibration_start(void)
|
||||
{
|
||||
CLEAR_PERI_REG_MASK(HP_SYS_CLKRST_ANA_PLL_CTRL0_REG, HP_SYS_CLKRST_REG_CPU_PLL_CAL_STOP);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Stop CPLL self-calibration
|
||||
*/
|
||||
static inline __attribute__((always_inline)) void clk_ll_cpll_calibration_stop(void)
|
||||
{
|
||||
SET_PERI_REG_MASK(HP_SYS_CLKRST_ANA_PLL_CTRL0_REG, HP_SYS_CLKRST_REG_CPU_PLL_CAL_STOP);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Check whether CPLL calibration is done
|
||||
*
|
||||
* @return True if calibration is done; otherwise false
|
||||
*/
|
||||
static inline __attribute__((always_inline)) bool clk_ll_cpll_calibration_is_done(void)
|
||||
{
|
||||
return REG_GET_BIT(HP_SYS_CLKRST_ANA_PLL_CTRL0_REG, HP_SYS_CLKRST_REG_CPU_PLL_CAL_END);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get MPLL_CLK frequency (only reliable when MPLL power is on)
|
||||
*
|
||||
@@ -376,6 +402,32 @@ static inline __attribute__((always_inline)) void clk_ll_mpll_set_config(uint32_
|
||||
// TODO: [ESP32S31] IDF-14733
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Start MPLL self-calibration
|
||||
*/
|
||||
static inline __attribute__((always_inline)) void clk_ll_mpll_calibration_start(void)
|
||||
{
|
||||
CLEAR_PERI_REG_MASK(HP_SYS_CLKRST_ANA_PLL_CTRL0_REG, HP_SYS_CLKRST_REG_MSPI_CAL_STOP);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Stop MPLL self-calibration
|
||||
*/
|
||||
static inline __attribute__((always_inline)) void clk_ll_mpll_calibration_stop(void)
|
||||
{
|
||||
SET_PERI_REG_MASK(HP_SYS_CLKRST_ANA_PLL_CTRL0_REG, HP_SYS_CLKRST_REG_MSPI_CAL_STOP);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Check whether MPLL calibration is done
|
||||
*
|
||||
* @return True if calibration is done; otherwise false
|
||||
*/
|
||||
static inline __attribute__((always_inline)) bool clk_ll_mpll_calibration_is_done(void)
|
||||
{
|
||||
return REG_GET_BIT(HP_SYS_CLKRST_ANA_PLL_CTRL0_REG, HP_SYS_CLKRST_REG_MSPI_CAL_END);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get APLL configuration which can be used to calculate APLL frequency
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user