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

Peter Kietzmann notifications at github.com
Mon Jun 8 08:51:52 CEST 2015


> +#include "periph/pwm.h"     /* "driver", interface of pwm.c ONLY */
> +
> +/*
> + * guard file in case no PWM device is defined, all #define'd in "periph_conf.h"
> + */
> +#if PWM_NUMOF && (PWM_0_EN || PWM_1_EN || PWM_2_EN || PWM_3_EN)
> +
> +#define ERR_INIT_MODE           (-1)
> +#define ERR_INIT_BWTH           (-2)
> +#define ERR_SET_CHAN            (-1)
> +
> +// Disable IO on PC2 and set Peripheral device B (PWM0L)
> +#define PWM_0_PIN_SET                           \
> +    PIOC->PIO_PDR |= PIO_PDR_P2;                \
> +    PIOC->PIO_ABSR |= PWM_0_PIN;
> +

Where do you use this macro? 

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


More information about the notifications mailing list