mirror of
https://github.com/apache/nuttx.git
synced 2026-05-23 14:58:13 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user