From b8374cbf1def14bfe7b4813beb3a77e36a1b9b6f Mon Sep 17 00:00:00 2001 From: Michal Lenc Date: Fri, 27 Mar 2026 09:31:30 +0100 Subject: [PATCH] nucleo-l476rg: fix ADC driver compilation The definition of ADC channels should not depend on option CONFIG_INPUT_AJOYSTICK at all. Moreover, the include of stm32l4_adc.h file was missing (PWM include was used instead), causing the implicit declaration of stm32l4_adc_initialize function. Signed-off-by: Michal Lenc --- boards/arm/stm32l4/nucleo-l476rg/src/stm32_adc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/boards/arm/stm32l4/nucleo-l476rg/src/stm32_adc.c b/boards/arm/stm32l4/nucleo-l476rg/src/stm32_adc.c index fe03eb6da9f..c650fc01beb 100644 --- a/boards/arm/stm32l4/nucleo-l476rg/src/stm32_adc.c +++ b/boards/arm/stm32l4/nucleo-l476rg/src/stm32_adc.c @@ -35,7 +35,7 @@ #include "chip.h" #include "arm_internal.h" -#include "stm32l4_pwm.h" +#include "stm32l4_adc.h" #include "nucleo-l476rg.h" #ifdef CONFIG_STM32L4_ADC1 @@ -58,7 +58,6 @@ /* Identifying number of each ADC channel. */ -#ifdef CONFIG_INPUT_AJOYSTICK #ifdef CONFIG_ADC_DMA /* The Itead analog joystick gets inputs on ADC_IN1 and ADC_IN2 */ @@ -94,7 +93,6 @@ static const uint32_t g_adc1_pinlist[ADC1_NCHANNELS] = }; #endif /* CONFIG_ADC_DMA */ -#endif /* CONFIG_INPUT_AJOYSTICK */ /**************************************************************************** * Private Functions