mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
Merge branch 'bugfix/ledc_mem_pd' into 'master'
fix(ledc): clear ledc_mem_force_pd when LEDC peripheral is in use C5 Closes IDF-10250, IDF-9100, IDF-8969, and IDF-10333 See merge request espressif/esp-idf!31850
This commit is contained in:
@@ -35,17 +35,29 @@ extern "C" {
|
||||
*
|
||||
* @param enable Enable/Disable
|
||||
*/
|
||||
static inline void ledc_ll_enable_bus_clock(bool enable) {
|
||||
static inline void ledc_ll_enable_bus_clock(bool enable)
|
||||
{
|
||||
PCR.ledc_conf.ledc_clk_en = enable;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Reset whole peripheral register to init value defined by HW design
|
||||
*/
|
||||
static inline void ledc_ll_enable_reset_reg(bool enable) {
|
||||
static inline void ledc_ll_enable_reset_reg(bool enable)
|
||||
{
|
||||
PCR.ledc_conf.ledc_rst_en = enable;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Enable the power for LEDC memory block
|
||||
*
|
||||
* Note. This function cannot overwrite the power control of the mem block in sleep mode
|
||||
*/
|
||||
static inline void ledc_ll_enable_mem_power(bool enable)
|
||||
{
|
||||
PCR.ledc_pd_ctrl.ledc_mem_force_pd = !enable;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Enable LEDC function clock
|
||||
*
|
||||
@@ -54,7 +66,8 @@ static inline void ledc_ll_enable_reset_reg(bool enable) {
|
||||
*
|
||||
* @return None
|
||||
*/
|
||||
static inline void ledc_ll_enable_clock(ledc_dev_t *hw, bool en) {
|
||||
static inline void ledc_ll_enable_clock(ledc_dev_t *hw, bool en)
|
||||
{
|
||||
(void)hw;
|
||||
PCR.ledc_sclk_conf.ledc_sclk_en = en;
|
||||
}
|
||||
|
Reference in New Issue
Block a user