diff --git a/boards/stm32l476g-disco/Makefile.features b/boards/stm32l476g-disco/Makefile.features index 8151764276..92ab935753 100644 --- a/boards/stm32l476g-disco/Makefile.features +++ b/boards/stm32l476g-disco/Makefile.features @@ -2,6 +2,7 @@ CPU = stm32 CPU_MODEL = stm32l476vg # Put defined MCU peripherals here (in alphabetical order) +FEATURES_PROVIDED += periph_adc FEATURES_PROVIDED += periph_rtc FEATURES_PROVIDED += periph_rtt FEATURES_PROVIDED += periph_timer diff --git a/boards/stm32l476g-disco/include/periph_conf.h b/boards/stm32l476g-disco/include/periph_conf.h index 9b33c58add..dfb4b514d0 100644 --- a/boards/stm32l476g-disco/include/periph_conf.h +++ b/boards/stm32l476g-disco/include/periph_conf.h @@ -80,6 +80,19 @@ static const uart_conf_t uart_config[] = { #define UART_NUMOF ARRAY_SIZE(uart_config) /** @} */ +static const adc_conf_t adc_config[] = { + {GPIO_PIN(PORT_A, 0), 0, 5}, /*< ADC12_IN5 */ + {GPIO_PIN(PORT_A, 5), 0, 10}, /*< ADC12_IN10 */ + {GPIO_PIN(PORT_A, 1), 0, 6}, /*< ADC12_IN6 */ + {GPIO_PIN(PORT_A, 2), 0, 7}, /*< ADC12_IN7 */ + {GPIO_PIN(PORT_A, 3), 0, 8}, /*< ADC12_IN8 */ + {GPIO_UNDEF, 0, 18}, /* VBAT */ +}; + +#define VBAT_ADC ADC_LINE(5) /**< VBAT ADC line */ + +#define ADC_NUMOF ARRAY_SIZE(adc_config) + #ifdef __cplusplus } #endif