From d9837a495f699fb0f513ecbe8bee182797f2a5c4 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Sat, 24 Jun 2017 21:58:34 +0200 Subject: [PATCH] board/nucleo144-f429: add ADC configuration --- boards/nucleo144-f429/Makefile.features | 1 + boards/nucleo144-f429/include/periph_conf.h | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/boards/nucleo144-f429/Makefile.features b/boards/nucleo144-f429/Makefile.features index 8bab3dc60..bc2fe242e 100644 --- a/boards/nucleo144-f429/Makefile.features +++ b/boards/nucleo144-f429/Makefile.features @@ -1,4 +1,5 @@ # Put defined MCU peripherals here (in alphabetical order) +FEATURES_PROVIDED += periph_adc FEATURES_PROVIDED += periph_cpuid FEATURES_PROVIDED += periph_gpio FEATURES_PROVIDED += periph_hwrng diff --git a/boards/nucleo144-f429/include/periph_conf.h b/boards/nucleo144-f429/include/periph_conf.h index cbb98082b..29eb74722 100644 --- a/boards/nucleo144-f429/include/periph_conf.h +++ b/boards/nucleo144-f429/include/periph_conf.h @@ -224,10 +224,24 @@ static const spi_conf_t spi_config[] = { /** @} */ /** - * @name ADC configuration + * @name ADC configuration + * + * Note that we do not configure all ADC channels, + * and not in the STM32F429zi order. Instead, we + * just define 6 ADC channels, for the Nucleo + * Arduino header pins A0-A5 + * * @{ */ -#define ADC_NUMOF (0) +#define ADC_NUMOF (6U) +#define ADC_CONFIG { \ + {GPIO_PIN(PORT_A, 3), 2, 3}, \ + {GPIO_PIN(PORT_C, 0), 2, 10}, \ + {GPIO_PIN(PORT_C, 3), 2, 13}, \ + {GPIO_PIN(PORT_F, 3), 2, 9}, \ + {GPIO_PIN(PORT_F, 5), 2, 15}, \ + {GPIO_PIN(PORT_F, 10), 2, 8}, \ +} /** @} */ /**