From e2e54db822e95373da479ec159b4310f92263987 Mon Sep 17 00:00:00 2001 From: hugues Date: Tue, 25 Aug 2020 15:51:56 +0200 Subject: [PATCH] boards/nucleo-f410rb: declare adc_config[] directly in periph_conf.h --- boards/nucleo-f410rb/include/periph_conf.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/boards/nucleo-f410rb/include/periph_conf.h b/boards/nucleo-f410rb/include/periph_conf.h index 4660c3c0d8..0e2d38e6f7 100644 --- a/boards/nucleo-f410rb/include/periph_conf.h +++ b/boards/nucleo-f410rb/include/periph_conf.h @@ -140,15 +140,16 @@ static const spi_conf_t spi_config[] = { * * @{ */ -#define ADC_NUMOF (6U) -#define ADC_CONFIG { \ - {GPIO_PIN(PORT_A, 0), 0, 0}, \ - {GPIO_PIN(PORT_A, 1), 0, 1}, \ - {GPIO_PIN(PORT_A, 4), 0, 4}, \ - {GPIO_PIN(PORT_B, 0), 0, 8}, \ - {GPIO_PIN(PORT_C, 1), 0, 11}, \ - {GPIO_PIN(PORT_C, 0), 0, 10}, \ -} +static const adc_conf_t adc_config[] = { + {GPIO_PIN(PORT_A, 0), 0, 0}, + {GPIO_PIN(PORT_A, 1), 0, 1}, + {GPIO_PIN(PORT_A, 4), 0, 4}, + {GPIO_PIN(PORT_B, 0), 0, 8}, + {GPIO_PIN(PORT_C, 1), 0, 11}, + {GPIO_PIN(PORT_C, 0), 0, 10}, +}; + +#define ADC_NUMOF ARRAY_SIZE(adc_config) /** @} */ #ifdef __cplusplus