Zephyr API Documentation 4.5.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
ad7794-adc.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2026 Testo SE & Co. KGaA
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_INCLUDE_DT_BINDINGS_ADC_AD7794_ADC_H_
8#define ZEPHYR_INCLUDE_DT_BINDINGS_ADC_AD7794_ADC_H_
9
10/*
11 * Analog input channels for zephyr,input-positive. Each value selects a fixed
12 * input pair of the channel multiplexer.
13 */
14#define AD7794_ADC_AIN1 0 /* AIN1(+) - AIN1(-) */
15#define AD7794_ADC_AIN2 1 /* AIN2(+) - AIN2(-) */
16#define AD7794_ADC_AIN3 2 /* AIN3(+) - AIN3(-) */
17#define AD7794_ADC_AIN4 3 /* AIN4(+) - AIN4(-) */
18#define AD7794_ADC_AIN5 4 /* AIN5(+) - AIN5(-) */
19#define AD7794_ADC_AIN6 5 /* AIN6(+) - AIN6(-) */
20#define AD7794_ADC_TEMP_SENSOR 6 /* Internal temperature sensor */
21#define AD7794_ADC_AVDD_MON 7 /* AVDD monitor */
22#define AD7794_ADC_AIN1M_AIN1M 8 /* AIN1(-) - AIN1(-), offset measurement */
23
24/*
25 * Output data rates (filter update rate select bits FS[3:0]) for
26 * zephyr,acquisition-time, used with the ADC_ACQ_TIME_TICKS unit:
27 * ADC_ACQ_TIME(ADC_ACQ_TIME_TICKS, AD7794_DR_16_7_HZ)
28 */
29#define AD7794_DR_470_HZ 1
30#define AD7794_DR_242_HZ 2
31#define AD7794_DR_123_HZ 3
32#define AD7794_DR_62_HZ 4
33#define AD7794_DR_50_HZ 5
34#define AD7794_DR_39_HZ 6
35#define AD7794_DR_33_2_HZ 7
36#define AD7794_DR_19_6_HZ 8 /* 90 dB 60 Hz rejection */
37#define AD7794_DR_16_7_HZ_50_HZ 9 /* 80 dB 50 Hz rejection */
38#define AD7794_DR_16_7_HZ 10 /* 65 dB 50/60 Hz rejection, power-on default */
39#define AD7794_DR_12_5_HZ 11
40#define AD7794_DR_10_HZ 12
41#define AD7794_DR_8_33_HZ 13
42#define AD7794_DR_6_25_HZ 14
43#define AD7794_DR_4_17_HZ 15
44
45/*
46 * Excitation current source configuration for zephyr,current-source-pin, given
47 * as uint8-array [direction current]. The values are two-digit hexadecimal
48 * bytes as required by the devicetree byte array syntax and are for use in
49 * devicetree sources only.
50 */
51#define AD7794_IEXCDIR_IOUT1_IOUT2 00 /* IEXC1 to IOUT1, IEXC2 to IOUT2 */
52#define AD7794_IEXCDIR_IOUT2_IOUT1 01 /* IEXC1 to IOUT2, IEXC2 to IOUT1 */
53#define AD7794_IEXCDIR_BOTH_IOUT1 02 /* Both to IOUT1, 10 uA or 210 uA only */
54#define AD7794_IEXCDIR_BOTH_IOUT2 03 /* Both to IOUT2, 10 uA or 210 uA only */
55
56#define AD7794_IEXCEN_OFF 00
57#define AD7794_IEXCEN_10_UA 01
58#define AD7794_IEXCEN_210_UA 02
59#define AD7794_IEXCEN_1_MA 03
60
61/*
62 * Bias voltage generator configuration for zephyr,vbias-pins.
63 * AD7794_VBIAS_BOOST can be combined with one of the inputs.
64 */
65#define AD7794_VBIAS_OFF 0
66#define AD7794_VBIAS_AIN1 1 /* Bias voltage on AIN1(-) */
67#define AD7794_VBIAS_AIN2 2 /* Bias voltage on AIN2(-) */
68#define AD7794_VBIAS_AIN3 3 /* Bias voltage on AIN3(-) */
69#define AD7794_VBIAS_BOOST 4 /* Increase bias generator current */
70
71#endif /* ZEPHYR_INCLUDE_DT_BINDINGS_ADC_AD7794_ADC_H_ */