13 #ifndef AD4130_SUPPORT_H_
14 #define AD4130_SUPPORT_H_
27 #define AD413X_ADDR(x) ((x) & 0xFF)
29 #define AD4130_INT_SRC_SEL_MSK NO_OS_GENMASK(9, 8)
30 #define AD4130_FILTER_FS_MSK NO_OS_GENMASK(10, 0)
31 #define AD4130_FIFO_MODE_MSK NO_OS_GENMASK(17, 16)
32 #define AD413X_WATERMARK_MSK NO_OS_GENMASK(7, 0)
34 #define AD413X_COMM_REG_RD NO_OS_BIT(6)
68 float rtd_ref, uint8_t chn);
70 uint32_t adc_samples);
adc_conv_int_source_e
Definition: ad4130_support.h:48
@ GPIO1_PIN
Definition: ad4130_support.h:51
@ INT_PIN
Definition: ad4130_support.h:49
@ CLK_PIN
Definition: ad4130_support.h:50
int32_t ad413x_mon_conv_and_read_data(struct ad413x_dev *dev, uint32_t *raw_data)
Function to monitor end of conversion and read conversion result.
Definition: ad4130_support.c:304
int32_t ad413x_set_filter_fs(struct ad413x_dev *dev, uint32_t fs, uint8_t preset)
Set filter FS value.
Definition: ad4130_support.c:471
float convert_adc_raw_into_rtd_resistance(void *dev, uint32_t adc_raw, float rtd_ref, uint8_t chn)
Convert the ADC raw value into equivalent RTD resistance.
Definition: ad4130_support.c:218
float ad4130_get_reference_voltage(struct ad413x_dev *dev, uint8_t chn)
Get reference voltage based on the reference source.
Definition: ad4130_support.c:69
float convert_adc_sample_into_voltage(void *dev, uint32_t adc_raw, uint8_t chn)
Convert the ADC raw value into equivalent voltage.
Definition: ad4130_support.c:140
int32_t ad413x_set_int_source(struct ad413x_dev *dev, adc_conv_int_source_e conv_int_source)
Set interrupt conversion source (GPIO)
Definition: ad4130_support.c:444
float convert_adc_data_to_voltage_wrt_vref(void *dev, int32_t code, uint8_t chn)
Convert ADC data to voltage w.r.t Vref.
Definition: ad4130_support.c:190
float convert_adc_data_to_voltage_without_vref(void *dev, int32_t code, uint8_t chn)
Convert ADC data to voltage without Vref.
Definition: ad4130_support.c:167
int32_t perform_sign_conversion(struct ad413x_dev *dev, uint32_t adc_raw_data, uint8_t chn)
Perform the sign conversion for handling negative voltages in bipolar mode.
Definition: ad4130_support.c:113
fifo_mode_e
Definition: ad4130_support.h:41
@ FIFO_STREAM_MODE
Definition: ad4130_support.h:44
@ FIFO_DISABLED
Definition: ad4130_support.h:42
@ FIFO_OLDEST_SAVE_MODE
Definition: ad4130_support.h:43
int32_t ad4130_read_fifo(struct ad413x_dev *dev, uint32_t *data, uint32_t adc_samples)
Read the data from FIFO.
Definition: ad4130_support.c:383
int32_t ad413x_read_single_sample(struct ad413x_dev *dev, uint8_t input_chn, uint32_t *adc_raw)
Function to read the single ADC sample (raw data) for input channel.
Definition: ad4130_support.c:244