From fcec19a446f7adf5efba430469b0b1e8d20b441e Mon Sep 17 00:00:00 2001 From: hugues Date: Tue, 25 Aug 2020 16:02:42 +0200 Subject: [PATCH] boards/nucleo-l031k6: declare adc_config[] directly in periph_conf.h --- boards/nucleo-l031k6/include/periph_conf.h | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/boards/nucleo-l031k6/include/periph_conf.h b/boards/nucleo-l031k6/include/periph_conf.h index b3e76a5bed..eb8e02035a 100644 --- a/boards/nucleo-l031k6/include/periph_conf.h +++ b/boards/nucleo-l031k6/include/periph_conf.h @@ -102,16 +102,17 @@ static const spi_conf_t spi_config[] = { * @name ADC configuration * @{ */ -#define ADC_CONFIG { \ - { GPIO_PIN(PORT_A, 0), 0 }, /* Pin A0 */ \ - { GPIO_PIN(PORT_A, 1), 1 }, /* Pin A1 */ \ - { GPIO_PIN(PORT_A, 3), 3 }, /* Pin A2 */ \ - { GPIO_PIN(PORT_A, 4), 4 }, /* Pin A3 */ \ - { GPIO_PIN(PORT_A, 5), 5 }, /* Pin A4 */ \ - { GPIO_PIN(PORT_A, 6), 6 }, /* Pin A5 */ \ - { GPIO_PIN(PORT_A, 7), 7 }, /* Pin A6 */ \ -} -#define ADC_NUMOF (7U) +static const adc_conf_t adc_config[] = { + { GPIO_PIN(PORT_A, 0), 0 }, /* Pin A0 */ + { GPIO_PIN(PORT_A, 1), 1 }, /* Pin A1 */ + { GPIO_PIN(PORT_A, 3), 3 }, /* Pin A2 */ + { GPIO_PIN(PORT_A, 4), 4 }, /* Pin A3 */ + { GPIO_PIN(PORT_A, 5), 5 }, /* Pin A4 */ + { GPIO_PIN(PORT_A, 6), 6 }, /* Pin A5 */ + { GPIO_PIN(PORT_A, 7), 7 }, /* Pin A6 */ +}; + +#define ADC_NUMOF ARRAY_SIZE(adc_config) /** @} */ #ifdef __cplusplus