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 <michallenc@seznam.cz>
This commit is contained in:
Michal Lenc
2026-03-27 09:31:30 +01:00
committed by Xiang Xiao
parent c252d564cd
commit b8374cbf1d
@@ -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