Bugfix:Allow mode switch on a free timer

This commit is contained in:
David Sidrane
2017-03-23 08:28:15 +01:00
committed by Lorenz Meier
parent 11191e54e0
commit 75376b7793
+3 -1
View File
@@ -577,7 +577,9 @@ int io_timer_set_rate(unsigned timer, unsigned rate)
/* Check that all channels are either in PWM or Oneshot */
if ((channels & (channel_allocations[IOTimerChanMode_PWMOut] | channel_allocations[IOTimerChanMode_OneShot])) ==
if ((channels & (channel_allocations[IOTimerChanMode_PWMOut] |
channel_allocations[IOTimerChanMode_OneShot] |
channel_allocations[IOTimerChanMode_NotUsed])) ==
channels) {
/* Change only a timer that is owned by pwm or one shot */