mirror of
https://github.com/apache/nuttx.git
synced 2026-05-24 07:46:16 +08:00
nucleo-f446re: add ADC example
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_ARCH_FPU is not set
|
||||
# CONFIG_NSH_ARGCAT is not set
|
||||
# CONFIG_NSH_CMDOPT_HEXDUMP is not set
|
||||
# CONFIG_NSH_CMDPARMS is not set
|
||||
# CONFIG_NSH_DISABLE_IFCONFIG is not set
|
||||
# CONFIG_NSH_DISABLE_PS is not set
|
||||
# CONFIG_STM32_ADC1_SCAN is not set
|
||||
# CONFIG_STM32_FLASH_PREFETCH is not set
|
||||
CONFIG_ADC=y
|
||||
CONFIG_ANALOG=y
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD="nucleo-f446re"
|
||||
CONFIG_ARCH_BOARD_NUCLEO_F446RE=y
|
||||
CONFIG_ARCH_BUTTONS=y
|
||||
CONFIG_ARCH_CHIP="stm32"
|
||||
CONFIG_ARCH_CHIP_STM32=y
|
||||
CONFIG_ARCH_CHIP_STM32F446R=y
|
||||
CONFIG_ARCH_INTERRUPTSTACK=2048
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=8499
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_EXAMPLES_ADC=y
|
||||
CONFIG_EXAMPLES_ADC_GROUPSIZE=2
|
||||
CONFIG_EXAMPLES_ADC_SWTRIG=y
|
||||
CONFIG_HAVE_CXX=y
|
||||
CONFIG_HAVE_CXXINITIALIZE=y
|
||||
CONFIG_INTELHEX_BINARY=y
|
||||
CONFIG_MAX_TASKS=16
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_LINELEN=64
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_PREALLOC_TIMERS=4
|
||||
CONFIG_RAM_SIZE=131072
|
||||
CONFIG_RAM_START=0x20000000
|
||||
CONFIG_RAW_BINARY=y
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_SDCLONE_DISABLE=y
|
||||
CONFIG_START_DAY=14
|
||||
CONFIG_START_MONTH=10
|
||||
CONFIG_START_YEAR=2014
|
||||
CONFIG_STM32_ADC1=y
|
||||
CONFIG_STM32_ADC1_DMA=y
|
||||
CONFIG_STM32_DMA2=y
|
||||
CONFIG_STM32_JTAG_SW_ENABLE=y
|
||||
CONFIG_STM32_TIM1=y
|
||||
CONFIG_STM32_TIM1_ADC=y
|
||||
CONFIG_STM32_USART2=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
CONFIG_USART2_SERIAL_CONSOLE=y
|
||||
CONFIG_USER_ENTRYPOINT="nsh_main"
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
/* The number of ADC channels in the conversion list */
|
||||
|
||||
#ifdef CONFIG_ADC_DMA
|
||||
#ifdef CONFIG_STM32_ADC1_DMA
|
||||
# define ADC1_NCHANNELS 2
|
||||
#else
|
||||
# define ADC1_NCHANNELS 1
|
||||
@@ -57,8 +57,7 @@
|
||||
|
||||
/* Identifying number of each ADC channel. */
|
||||
|
||||
#ifdef CONFIG_INPUT_AJOYSTICK
|
||||
#ifdef CONFIG_ADC_DMA
|
||||
#ifdef CONFIG_STM32_ADC1_DMA
|
||||
/* The Itead analog joystick gets inputs on ADC_IN0 and ADC_IN1 */
|
||||
|
||||
static const uint8_t g_adc1_chanlist[ADC1_NCHANNELS] =
|
||||
@@ -91,8 +90,7 @@ static const uint32_t g_adc1_pinlist[ADC1_NCHANNELS] =
|
||||
GPIO_ADC1_IN0
|
||||
};
|
||||
|
||||
#endif /* CONFIG_ADC_DMA */
|
||||
#endif /* CONFIG_INPUT_AJOYSTICK */
|
||||
#endif /* CONFIG_STM32_ADC1_DMA */
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
|
||||
Reference in New Issue
Block a user