From 737b8c0ff48cacaca535a6928fb63642b0d00d9c Mon Sep 17 00:00:00 2001 From: hugues Date: Tue, 25 Aug 2020 12:19:01 +0200 Subject: [PATCH] boards/nz32-sc151: declare adc_config[] directly in periph_conf.h --- boards/nz32-sc151/include/periph_conf.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/boards/nz32-sc151/include/periph_conf.h b/boards/nz32-sc151/include/periph_conf.h index 632c7493e6..821fb7357f 100644 --- a/boards/nz32-sc151/include/periph_conf.h +++ b/boards/nz32-sc151/include/periph_conf.h @@ -191,17 +191,17 @@ static const i2c_conf_t i2c_config[] = { * @name ADC configuration * @{ */ -#define ADC_CONFIG { \ - { GPIO_PIN(PORT_C, 0), 10 }, \ - { GPIO_PIN(PORT_C, 1), 11 }, \ - { GPIO_PIN(PORT_C, 2), 12 }, \ - /* ADC Temperature channel */ \ - { GPIO_UNDEF, 16 }, \ - /* ADC VREF channel */ \ - { GPIO_UNDEF, 17 }, \ -} +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 }, + /* ADC Temperature channel */ + { GPIO_UNDEF, 16 }, + /* ADC VREF channel */ + { GPIO_UNDEF, 17 }, +}; -#define ADC_NUMOF (5) +#define ADC_NUMOF ARRAY_SIZE(adc_config) /** @} */ /**