From d1a7ecb60ea47fc33e292ae390a07799a713e22e Mon Sep 17 00:00:00 2001 From: hugues Date: Tue, 25 Aug 2020 16:06:29 +0200 Subject: [PATCH] boards/nucleo-l476rg: declare adc_config[] directly in periph_conf.h --- boards/nucleo-l476rg/include/periph_conf.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/boards/nucleo-l476rg/include/periph_conf.h b/boards/nucleo-l476rg/include/periph_conf.h index c72582eb8d..e781c5593f 100644 --- a/boards/nucleo-l476rg/include/periph_conf.h +++ b/boards/nucleo-l476rg/include/periph_conf.h @@ -209,15 +209,16 @@ static const spi_conf_t spi_config[] = { * * @{ */ -#define ADC_NUMOF (6U) -#define ADC_CONFIG { \ - {GPIO_PIN(PORT_A, 0), 0, 5}, /*< ADC12_IN5 */ \ - {GPIO_PIN(PORT_A, 1), 0, 6}, /*< ADC12_IN6 */ \ - {GPIO_PIN(PORT_A, 4), 1, 9}, /*< ADC12_IN9 */ \ - {GPIO_PIN(PORT_B, 0), 1, 15}, /*< ADC12_IN15 */ \ - {GPIO_PIN(PORT_C, 1), 2, 2}, /*< ADC123_IN_2 */ \ - {GPIO_PIN(PORT_C, 0), 2, 1}, /*< ADC123_IN_1 */ \ -} +static const adc_conf_t adc_config[] = { + {GPIO_PIN(PORT_A, 0), 0, 5}, /*< ADC12_IN5 */ + {GPIO_PIN(PORT_A, 1), 0, 6}, /*< ADC12_IN6 */ + {GPIO_PIN(PORT_A, 4), 1, 9}, /*< ADC12_IN9 */ + {GPIO_PIN(PORT_B, 0), 1, 15}, /*< ADC12_IN15 */ + {GPIO_PIN(PORT_C, 1), 2, 2}, /*< ADC123_IN_2 */ + {GPIO_PIN(PORT_C, 0), 2, 1}, /*< ADC123_IN_1 */ +}; + +#define ADC_NUMOF ARRAY_SIZE(adc_config) /** @} */ #ifdef __cplusplus