Skip to content

Commit 8250cc6

Browse files
pcurtkartben
authored andcommitted
drivers: adc: ad4114: add driver support
The AD4114 is a low power, low noise, 24-bit, sigma-delta ADC. This driver allows to use it with the Zephyr ADC API. It uses the continuous acquisition ADC feature. This ADC allows many configutations, but this driver uses it as the most generic way : - each can channel can be enable or disable using the device tree configuration - configure two setups (one for unipolar inputs, one for bipolar inputs) - use an external clock Signed-off-by: Pierrick Curt <[email protected]>
1 parent a490c90 commit 8250cc6

File tree

6 files changed

+493
-0
lines changed

6 files changed

+493
-0
lines changed

drivers/adc/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,4 @@ zephyr_library_sources_ifdef(CONFIG_ADC_MCUX_GAU adc_mcux_gau_adc.c)
5656
zephyr_library_sources_ifdef(CONFIG_ADC_AMBIQ adc_ambiq.c)
5757
zephyr_library_sources_ifdef(CONFIG_ADC_RENESAS_RA adc_renesas_ra.c)
5858
zephyr_library_sources_ifdef(CONFIG_ADC_MAX32 adc_max32.c)
59+
zephyr_library_sources_ifdef(CONFIG_ADC_AD4114 adc_ad4114.c)

drivers/adc/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,4 +136,6 @@ source "drivers/adc/Kconfig.renesas_ra"
136136

137137
source "drivers/adc/Kconfig.max32"
138138

139+
source "drivers/adc/Kconfig.ad4114"
140+
139141
endif # ADC

drivers/adc/Kconfig.ad4114

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Copyright (c) 2023 Grinn
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config ADC_AD4114
5+
bool "AD4114 ADC driver"
6+
default y
7+
depends on DT_HAS_ADI_AD4114_ADC_ENABLED
8+
select SPI
9+
help
10+
Enable the AD4114 ADC driver.
11+
12+
config ADC_AD4114_ACQUISITION_THREAD_STACK_SIZE
13+
int "Stack size for the ADC data acquisition thread"
14+
depends on ADC_AD4114
15+
default 512
16+
help
17+
Size of the stack used for the internal data acquisition
18+
thread.
19+
20+
config ADC_AD4114_ACQUISITION_THREAD_PRIO
21+
int "Priority for the ADC data acquisition thread"
22+
depends on ADC_AD4114
23+
default 0
24+
help
25+
Priority level for the internal ADC data acquisition thread.

0 commit comments

Comments
 (0)