fix stop pwm
This commit is contained in:
parent
221d3551e2
commit
4fdf2e2857
1 changed files with 7 additions and 10 deletions
|
|
@ -189,13 +189,10 @@ void pwm_stop()
|
|||
{
|
||||
timer_set_interrupts(FRC1, false);
|
||||
timer_set_run(FRC1, false);
|
||||
if (pwmInfo.dutyCycle == 0 || pwmInfo.dutyCycle == UINT16_MAX)
|
||||
{
|
||||
for (uint8_t i = 0; i < pwmInfo.usedPins; ++i)
|
||||
{
|
||||
gpio_write(pwmInfo.pins[i].pin, pwmInfo.reverse ? true : false);
|
||||
}
|
||||
}
|
||||
debug("PWM stopped");
|
||||
pwmInfo.running = 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue