Allow to not use all channet in a lower part of PWM
This commit is contained in:
parent
5ef3e3e215
commit
39c1e3aba2
|
@ -1314,6 +1314,15 @@ static int pwm_timer(FAR struct stm32_pwmtimer_s *priv,
|
||||||
duty = info->channels[i].duty;
|
duty = info->channels[i].duty;
|
||||||
channel = info->channels[i].channel;
|
channel = info->channels[i].channel;
|
||||||
|
|
||||||
|
/* A value of zero means to skip this channel */
|
||||||
|
|
||||||
|
if (channel == 0)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Find the channel */
|
||||||
|
|
||||||
for (j = 0; j < PWM_NCHANNELS; j++)
|
for (j = 0; j < PWM_NCHANNELS; j++)
|
||||||
{
|
{
|
||||||
if (priv->channels[j].channel == channel)
|
if (priv->channels[j].channel == channel)
|
||||||
|
|
Loading…
Reference in New Issue