From 0943d12bb1c0e150a7b2cdfd5420acb172541f58 Mon Sep 17 00:00:00 2001 From: hugues Date: Tue, 25 Aug 2020 16:16:44 +0200 Subject: [PATCH] boards/ublox-c030-u201: declare adc_config[] directly in periph_conf.h --- boards/ublox-c030-u201/include/periph_conf.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/boards/ublox-c030-u201/include/periph_conf.h b/boards/ublox-c030-u201/include/periph_conf.h index 15a33512c6..714c5d82ce 100644 --- a/boards/ublox-c030-u201/include/periph_conf.h +++ b/boards/ublox-c030-u201/include/periph_conf.h @@ -243,15 +243,16 @@ static const i2c_conf_t i2c_config[] = { * * @{ */ -#define ADC_NUMOF (6U) -#define ADC_CONFIG { \ - {GPIO_PIN(PORT_A, 3), 0, 3}, \ - {GPIO_PIN(PORT_C, 0), 0, 10}, \ - {GPIO_PIN(PORT_C, 3), 0, 4}, \ - {GPIO_PIN(PORT_A, 4), 0, 14}, \ - {GPIO_PIN(PORT_B, 7), 0, 7}, \ - {GPIO_PIN(PORT_B, 6), 0, 6}, \ -} +static const adc_conf_t adc_config[] = { + {GPIO_PIN(PORT_A, 3), 0, 3}, + {GPIO_PIN(PORT_C, 0), 0, 10}, + {GPIO_PIN(PORT_C, 3), 0, 4}, + {GPIO_PIN(PORT_A, 4), 0, 14}, + {GPIO_PIN(PORT_B, 7), 0, 7}, + {GPIO_PIN(PORT_B, 6), 0, 6}, +}; + +#define ADC_NUMOF ARRAY_SIZE(adc_config) /** @} */ #ifdef __cplusplus