driver(ledc): fixed ledc clock selection bug.

This commit is contained in:
kooho
2018-11-01 12:23:11 +08:00
parent d260ee6955
commit 2e8c85d8ff
8 changed files with 107 additions and 35 deletions
@@ -63,7 +63,8 @@ void app_main(void)
.duty_resolution = LEDC_TIMER_13_BIT, // resolution of PWM duty
.freq_hz = 5000, // frequency of PWM signal
.speed_mode = LEDC_HS_MODE, // timer mode
.timer_num = LEDC_HS_TIMER // timer index
.timer_num = LEDC_HS_TIMER, // timer index
.clk_cfg = LEDC_AUTO_CLK, // Auto select the source clock
};
// Set configuration of timer0 for high speed channels
ledc_timer_config(&ledc_timer);