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
@@ -100,6 +100,7 @@ static void ledc_init(void)
ledc_timer.timer_num = LEDC_TIMER_1;
ledc_timer.duty_resolution = LEDC_TIMER_10_BIT;
ledc_timer.freq_hz = 1; // set output frequency at 1 Hz
ledc_timer.clk_cfg = LEDC_AUTO_CLK;
ledc_timer_config(&ledc_timer);
// Prepare and then apply the LEDC PWM channel configuration