fix stop pwm

This commit is contained in:
lilian 2017-11-23 19:12:31 +01:00
parent 221d3551e2
commit 4fdf2e2857

View file

@ -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;
}