Certain stm32 soc's have a single shared irq for all adc channels on those soc's only a single channel is supported. Added a Kconfig that enables a shared irq for stm32f2x, stm32f4x, stm32f7x soc's. The shared IRQ uses a flag to limit the number of interrupts defined to only 1. A shared irq handler is added which determines which ADC instance the interrupt is for, it then calls into the existing interrupt. Signed-off-by: Marius Scholtz <mariuss@ricelectronics.com>
23 lines
670 B
Text
23 lines
670 B
Text
# ADC configuration options
|
|
|
|
# Copyright (c) 2019 Intel Corporation
|
|
# Copyright (c) 2019 Endre Karlson
|
|
# Copyright (c) 2019 Song Qiang <songqiang1304521@gmail.com>
|
|
# Copyright (c) 2021 Marius Scholtz, RIC Electronics
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
config ADC_STM32
|
|
bool "STM32 ADC driver"
|
|
depends on SOC_FAMILY_STM32
|
|
help
|
|
Enable the driver implementation for the stm32xx ADC
|
|
|
|
if SOC_SERIES_STM32F2X || SOC_SERIES_STM32F4X || SOC_SERIES_STM32F7X
|
|
|
|
config ADC_STM32_SHARED_IRQS
|
|
bool "STM32 ADC shared interrupts"
|
|
default y
|
|
depends on ADC_STM32
|
|
help
|
|
Enable the use of shared interrupts for families that only have a single interrupt for all ADC's
|
|
endif
|