14#ifndef AD7606_SUPPORT_H_
15#define AD7606_SUPPORT_H_
28#define CHANNEL_RANGE_MSK_OFFSET 4
31#define AD7606_OVERSAMPLING_MSK NO_OS_GENMASK(3,0)
34#define DEFAULT_CHN_RANGE (10.0)
37#define AD7606_DIAGN_MUX_CH_MSK(ch) (NO_OS_GENMASK(2, 0) << (3 * ((ch) % 2)))
38#define AD7606_DIAGN_MUX_CH_VAL(ch, val) (val << (3 * ((ch) % 2)))
40#define AD7606_OPEN_DETECT_ENABLE_MSK(ch) (NO_OS_GENMASK(7,0) & (~(1 << ch)))
43#define ANALOG_INPUT_MUX 0X00
44#define TEMPERATURE_MUX 0x01
48#define VDRIVE_MUX 0x05
51#define VREF_MUX_MULTIPLIER 4.0
54#define AD7606C_UNIPOLAR_RANGE_MIN 5
55#define AD7606C_UNIPOLAR_RANGE_MAX 7
58#define NUM_OF_REGISTERS 0x2F
polarity_e ad7606_get_input_polarity(uint8_t chn_range_bits)
Function to get the polarity of analog input.
Definition ad7606_support.c:47
polarity_e
Definition ad7606_support.h:65
@ BIPOLAR
Definition ad7606_support.h:67
@ UNIPOLAR
Definition ad7606_support.h:66
int32_t ad7606_read_single_sample(struct ad7606_dev *dev, uint32_t *adc_data, uint8_t chn)
Perform conversion and read single conversion sample.
Definition ad7606_support.c:68
int32_t ad7606_read_converted_sample(struct ad7606_dev *dev, uint32_t *adc_data, uint8_t input_chn)
Read ADC raw data for recently sampled channel.
Definition ad7606_support.c:96