From 2a1c7680fad271aeaf349ab667b5ac231cb35b16 Mon Sep 17 00:00:00 2001 From: paula75 <paula.ortega@inria.cl> Date: Tue, 9 Jan 2018 12:30:51 -0300 Subject: [PATCH] boards/nucleo32-l031: add adc configuration --- boards/nucleo32-l031/Makefile.features | 1 + boards/nucleo32-l031/include/periph_conf.h | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/boards/nucleo32-l031/Makefile.features b/boards/nucleo32-l031/Makefile.features index f92958c64f..0e680df714 100644 --- a/boards/nucleo32-l031/Makefile.features +++ b/boards/nucleo32-l031/Makefile.features @@ -1,4 +1,5 @@ # Put defined MCU peripherals here (in alphabetical order) +FEATURES_PROVIDED += periph_adc FEATURES_PROVIDED += periph_gpio FEATURES_PROVIDED += periph_pwm FEATURES_PROVIDED += periph_rtc diff --git a/boards/nucleo32-l031/include/periph_conf.h b/boards/nucleo32-l031/include/periph_conf.h index 130eb4d951..cfd77908d7 100644 --- a/boards/nucleo32-l031/include/periph_conf.h +++ b/boards/nucleo32-l031/include/periph_conf.h @@ -153,7 +153,16 @@ static const spi_conf_t spi_config[] = { * @name ADC configuration * @{ */ -#define ADC_NUMOF (0) +#define ADC_CONFIG { \ + { GPIO_PIN(PORT_A, 0), 0 }, /* Pin A0 */ \ + { GPIO_PIN(PORT_A, 1), 1 }, /* Pin A1 */ \ + { GPIO_PIN(PORT_A, 3), 3 }, /* Pin A2 */ \ + { GPIO_PIN(PORT_A, 4), 4 }, /* Pin A3 */ \ + { GPIO_PIN(PORT_A, 5), 5 }, /* Pin A4 */ \ + { GPIO_PIN(PORT_A, 6), 6 }, /* Pin A5 */ \ + { GPIO_PIN(PORT_A, 7), 7 }, /* Pin A6 */ \ +} +#define ADC_NUMOF (7U) /** @} */ /** -- GitLab