From 213c0c0d3491c2cedcd1811339a4f77105298bf5 Mon Sep 17 00:00:00 2001 From: hugues Date: Tue, 25 Aug 2020 15:59:09 +0200 Subject: [PATCH] boards/nucleo-f413zh: declare adc_config[] directly in periph_conf.h --- boards/nucleo-f413zh/include/periph_conf.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/boards/nucleo-f413zh/include/periph_conf.h b/boards/nucleo-f413zh/include/periph_conf.h index 747ba70121..3b7d38b8e3 100644 --- a/boards/nucleo-f413zh/include/periph_conf.h +++ b/boards/nucleo-f413zh/include/periph_conf.h @@ -172,15 +172,16 @@ static const spi_conf_t spi_config[] = { * * @{ */ -#define ADC_NUMOF (6U) -#define ADC_CONFIG { \ - {GPIO_PIN(PORT_A, 3), 0, 3}, \ - {GPIO_PIN(PORT_C, 0), 0, 10}, \ - {GPIO_PIN(PORT_C, 3), 0, 13}, \ - {GPIO_PIN(PORT_C, 1), 0, 11}, \ - {GPIO_PIN(PORT_C, 4), 0, 14}, \ - {GPIO_PIN(PORT_C, 5), 0, 15}, \ -} +static const adc_conf_t adc_config[] = { + {GPIO_PIN(PORT_A, 3), 0, 3}, + {GPIO_PIN(PORT_C, 0), 0, 10}, + {GPIO_PIN(PORT_C, 3), 0, 13}, + {GPIO_PIN(PORT_C, 1), 0, 11}, + {GPIO_PIN(PORT_C, 4), 0, 14}, + {GPIO_PIN(PORT_C, 5), 0, 15}, +}; + +#define ADC_NUMOF ARRAY_SIZE(adc_config) /** @} */ /**