Merge branch 'bugfix/clear_ledc_gamma_ram_v5.4' into 'release/v5.4'

fix(ledc): left-off gamma ram registers should be cleared (v5.4)

See merge request espressif/esp-idf!37572
This commit is contained in:
morris
2025-04-01 11:13:32 +08:00
12 changed files with 81 additions and 19 deletions

View File

@@ -15,6 +15,7 @@
#include "soc/ledc_reg.h"
#include "soc/clk_tree_defs.h"
#include "soc/pcr_struct.h"
#include "soc/soc_caps.h"
#ifdef __cplusplus
extern "C" {
@@ -369,6 +370,7 @@ static inline void ledc_ll_get_duty(ledc_dev_t *hw, ledc_mode_t speed_mode, ledc
*/
static inline void ledc_ll_set_fade_param_range(ledc_dev_t *hw, ledc_mode_t speed_mode, ledc_channel_t channel_num, uint8_t range, uint32_t dir, uint32_t cycle, uint32_t scale, uint32_t step)
{
HAL_ASSERT(range < SOC_LEDC_GAMMA_CURVE_FADE_RANGE_MAX);
ledc_channel_gamma_fade_param_t range_param = {
.duty_inc = dir,
.duty_cycle = cycle,