mirror of
https://github.com/apache/nuttx.git
synced 2026-10-09 15:25:24 +00:00
Allow to not use all channet in a lower part of PWM
This commit is contained in:
parent
5ef3e3e215
commit
39c1e3aba2
1 changed files with 9 additions and 0 deletions
|
|
@ -1314,6 +1314,15 @@ static int pwm_timer(FAR struct stm32_pwmtimer_s *priv,
|
|||
duty = info->channels[i].duty;
|
||||
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++)
|
||||
{
|
||||
if (priv->channels[j].channel == channel)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue