From 477e9100660162a08047b61ebdbf25c616dc49c2 Mon Sep 17 00:00:00 2001 From: hugues Date: Tue, 25 Aug 2020 16:12:10 +0200 Subject: [PATCH] boards/stm32f0discovery: declare adc_config[] directly in periph_conf.h --- boards/stm32f0discovery/include/periph_conf.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/boards/stm32f0discovery/include/periph_conf.h b/boards/stm32f0discovery/include/periph_conf.h index 14314992e0..ca14edd96e 100644 --- a/boards/stm32f0discovery/include/periph_conf.h +++ b/boards/stm32f0discovery/include/periph_conf.h @@ -112,16 +112,16 @@ static const uart_conf_t uart_config[] = { * [ pin, channel ] * @{ */ -#define ADC_CONFIG { \ - { GPIO_PIN(PORT_C, 0), 10 },\ - { GPIO_PIN(PORT_C, 1), 11 },\ - { GPIO_PIN(PORT_C, 2), 12 },\ - { GPIO_PIN(PORT_C, 3), 13 },\ - { GPIO_PIN(PORT_C, 4), 14 },\ - { GPIO_PIN(PORT_C, 5), 15 } \ -} +static const adc_conf_t adc_config[] = { + { GPIO_PIN(PORT_C, 0), 10 }, + { GPIO_PIN(PORT_C, 1), 11 }, + { GPIO_PIN(PORT_C, 2), 12 }, + { GPIO_PIN(PORT_C, 3), 13 }, + { GPIO_PIN(PORT_C, 4), 14 }, + { GPIO_PIN(PORT_C, 5), 15 } +}; -#define ADC_NUMOF (6) +#define ADC_NUMOF ARRAY_SIZE(adc_config) /** @} */ /**