[riot-notifications] [RIOT] [WIP] cpu/sam3x8e: Add pwm implementation (#3170)

A-Paul notifications at github.com
Wed Jun 10 16:52:55 CEST 2015


> +            chan = PWM_0_DEV_CH6;
> +            break;
> +#endif
> +#if PWM_0_CHANNELS > 7
> +
> +        case 7:
> +            chan = PWM_0_DEV_CH7;
> +            break;
> +#endif
> +
> +        default:
> +            ;
> +    }
> +
> +    if (chan) {
> +        period = chan->PWM_CPRD & PWM_MAX_VALUE;

It's the actual channels `period` length ( which is `resolution - 1`) I limit the requested new duty-cycle to this value.
This is mentioned in the function comment and -more important- required by the interface. ;)
I take your question as a valid cause for placing a inline comment there.

---
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/3170/files#r32125725
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20150610/a3e6a2cf/attachment.html>


More information about the notifications mailing list