From 0b36699d315b7514705fb439882e57d46f573120 Mon Sep 17 00:00:00 2001 From: hugues Date: Tue, 25 Aug 2020 15:47:02 +0200 Subject: [PATCH] boards/nucleo-f091rc: declare adc_config[] directly in periph_conf.h --- boards/nucleo-f091rc/include/periph_conf.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/boards/nucleo-f091rc/include/periph_conf.h b/boards/nucleo-f091rc/include/periph_conf.h index 510ee996fe..19b268a997 100644 --- a/boards/nucleo-f091rc/include/periph_conf.h +++ b/boards/nucleo-f091rc/include/periph_conf.h @@ -208,16 +208,16 @@ static const pwm_conf_t pwm_config[] = { * @name ADC configuration * @{ */ -#define ADC_CONFIG { \ - { GPIO_PIN(PORT_A, 0), 0 },\ - { GPIO_PIN(PORT_A, 1), 1 },\ - { GPIO_PIN(PORT_A, 4), 4 },\ - { GPIO_PIN(PORT_B, 0), 8 },\ - { GPIO_PIN(PORT_C, 1), 11 },\ - { GPIO_PIN(PORT_C, 0), 10 } \ -} +static const adc_conf_t adc_config[] = { + { GPIO_PIN(PORT_A, 0), 0 }, + { GPIO_PIN(PORT_A, 1), 1 }, + { GPIO_PIN(PORT_A, 4), 4 }, + { GPIO_PIN(PORT_B, 0), 8 }, + { GPIO_PIN(PORT_C, 1), 11 }, + { GPIO_PIN(PORT_C, 0), 10 } +}; -#define ADC_NUMOF (6) +#define ADC_NUMOF ARRAY_SIZE(adc_config) /** @} */ #ifdef __cplusplus