1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

boards/stm32l476g-disco: add ADC support

This commit is contained in:
krzysztof-cabaj 2024-07-19 11:50:39 +02:00
parent 4612cc2348
commit 098a34452a
2 changed files with 14 additions and 0 deletions

View File

@ -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

View File

@ -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