From 5ecf2e8bb1d2debac29bb46189382e334282737c Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Fri, 26 Jun 2020 16:31:15 +0200 Subject: [PATCH] cpu/nrf52: ensure PWM is present Not all members of the family have a PWM peripheral --- cpu/nrf52/include/periph_cpu.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cpu/nrf52/include/periph_cpu.h b/cpu/nrf52/include/periph_cpu.h index 31fb31494d..0490ea9892 100644 --- a/cpu/nrf52/include/periph_cpu.h +++ b/cpu/nrf52/include/periph_cpu.h @@ -174,10 +174,12 @@ typedef enum { * always start with channel 0 to x and the undefined ones are from x+1 * to PWM_CHANNELS. */ +#if defined(PWM_PRESENT) || DOXYGEN typedef struct { NRF_PWM_Type *dev; /**< PWM device descriptor */ gpio_t pin[PWM_CHANNELS]; /**< PWM out pins */ } pwm_conf_t; +#endif #if !defined(CPU_MODEL_NRF52832XXAA) /**