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

A-Paul notifications at github.com
Mon Jun 8 17:46:52 CEST 2015


> + * @{
> + */
> +#define MCK_DIV_LB_MAX      (10U)
> +#define PWM_NUMOF           (1U)
> +#define PWM_0_EN            (1)
> +#define PWM_MAX_VALUE       (0xffff)
> +//#define PWM_MAX_CHANNELS    4
> +
> +/* Temporary PC2 -- Pin34 XIO-15 */
> +#define PWM_0_PIN           PIO_PC2B_PWML0
> +
> +/* PWM_0 configuration */
> +#define PWM_0_DEV           PWM
> +#define PWM_0_PID           ID_PWM
> +#define PWM_0_CHANNELS      (4U)
> +#define PWM_CHNR_BIAS       (4U)

_PWM_CHNR_BIAS_ is added to the channel number in _pwm_set()_
Like https://github.com/RIOT-OS/RIOT/pull/3170#discussion-diff-31889242, this also addresses how I handle the channels at the moment. It let "tests/periph_pwm" work with the proposed channels 4-7 as 0-3.

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


More information about the notifications mailing list