From 58e37a7c589271b0f35e3e6e35c2cf4f9b817d0d Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Wed, 23 Nov 2022 13:53:32 +0100 Subject: [PATCH] boards/saml21-xpro: fix style of PWM config --- boards/saml21-xpro/include/periph_conf.h | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/boards/saml21-xpro/include/periph_conf.h b/boards/saml21-xpro/include/periph_conf.h index aca1d48983..40e4691366 100644 --- a/boards/saml21-xpro/include/periph_conf.h +++ b/boards/saml21-xpro/include/periph_conf.h @@ -123,25 +123,24 @@ static const uart_conf_t uart_config[] = { * @name PWM configuration * @{ */ -#define PWM_0_EN 1 - -#if PWM_0_EN /* PWM0 channels */ static const pwm_conf_chan_t pwm_chan0_config[] = { /* GPIO pin, MUX value, TCC channel */ - { GPIO_PIN(PB, 10), GPIO_MUX_F, 4 }, + { + .pin = GPIO_PIN(PB, 10), + .mux = GPIO_MUX_F, + .chan = 4 + }, }; -#endif /* PWM device configuration */ static const pwm_conf_t pwm_config[] = { -#if PWM_0_EN - { .tim = TCC_CONFIG(TCC0), - .chan = pwm_chan0_config, - .chan_numof = ARRAY_SIZE(pwm_chan0_config), - .gclk_src = SAM0_GCLK_TIMER, + { + .tim = TCC_CONFIG(TCC0), + .chan = pwm_chan0_config, + .chan_numof = ARRAY_SIZE(pwm_chan0_config), + .gclk_src = SAM0_GCLK_TIMER, }, -#endif }; /* number of devices that are actually defined */