From cbd60b68a33941b4397f4d46c1b2548234cbde9d Mon Sep 17 00:00:00 2001 From: hugues Date: Tue, 25 Aug 2020 16:05:30 +0200 Subject: [PATCH] boards/nucleo-l152re: declare adc_config[] directly in periph_conf.h --- boards/nucleo-l152re/include/periph_conf.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/boards/nucleo-l152re/include/periph_conf.h b/boards/nucleo-l152re/include/periph_conf.h index 306c5cc141..713540505c 100644 --- a/boards/nucleo-l152re/include/periph_conf.h +++ b/boards/nucleo-l152re/include/periph_conf.h @@ -236,16 +236,16 @@ static const i2c_conf_t i2c_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 (6U) +#define ADC_NUMOF ARRAY_SIZE(adc_config) /** @} */ /**