esp32[c3|c6|h2]: Fix ledc clk issue
This commit is contained in:
parent
8256864bfe
commit
c3d03f02fb
1 changed files with 6 additions and 1 deletions
|
@ -824,11 +824,16 @@ static int ledc_set_timer_div(ledc_timer_t timer_num,
|
|||
pwmerr("Timer clock conflict. Already is %d but attempt to %d",
|
||||
p_ledc_obj->glb_clk,
|
||||
glb_clk);
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (timer_num == LEDC_TIMER_MAX - 1 &&
|
||||
p_ledc_obj->glb_clk_is_acquired[timer_num - 1])
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
p_ledc_obj->glb_clk_is_acquired[timer_num] = true;
|
||||
if (p_ledc_obj->glb_clk != glb_clk)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue