configure ledc to auto select clock

This commit is contained in:
Felix Penzlin 2022-02-07 12:04:21 +01:00 committed by Johny Mattsson
parent 4523bbb36d
commit f125b2d059
1 changed files with 2 additions and 0 deletions

View File

@ -30,6 +30,8 @@ static int lledc_new_channel( lua_State *L )
ledc_timer.timer_num = opt_checkint_range(L, "timer", -1, 0, LEDC_TIMER_MAX-1);
ledc_timer.clk_cfg = LEDC_AUTO_CLK;
/* Setup channel */
ledc_channel_config_t channel_config = {
.speed_mode = ledc_timer.speed_mode,