This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new b8374cbf1de nucleo-l476rg: fix ADC driver compilation
b8374cbf1de is described below
commit b8374cbf1def14bfe7b4813beb3a77e36a1b9b6f
Author: Michal Lenc <[email protected]>
AuthorDate: Fri Mar 27 09:31:30 2026 +0100
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 <[email protected]>
---
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