Example program for EVAL-AD4130
Dependencies: tempsensors sdp_k1_sdram
ad4130_support.h File Reference
Header for AD4130 No-OS driver supports. More...
Go to the source code of this file.
Functions | |
float | ad4130_get_reference_voltage (struct ad413x_dev *dev, uint8_t chn) |
Get reference voltage based on the reference source. | |
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. | |
float | convert_adc_sample_into_voltage (void *dev, uint32_t adc_raw, uint8_t chn) |
Convert the ADC raw value into equivalent voltage. | |
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. | |
int32_t | ad4130_read_fifo (struct ad413x_dev *dev, uint32_t *data, uint32_t adc_samples) |
Read the data from FIFO. | |
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. | |
int32_t | ad413x_set_int_source (struct ad413x_dev *dev, adc_conv_int_source_e conv_int_source) |
Set interrupt conversion source (GPIO) | |
int32_t | ad413x_set_filter_fs (struct ad413x_dev *dev, uint32_t fs, uint8_t preset) |
Set filter FS value. |
Detailed Description
Header for AD4130 No-OS driver supports.
Copyright (c) 2020-2022 Analog Devices, Inc. All rights reserved.
This software is proprietary to Analog Devices, Inc. and its licensors. By using this software you agree to the terms of the associated Analog Devices Software License Agreement.
Definition in file ad4130_support.h.
Function Documentation
float ad4130_get_reference_voltage | ( | struct ad413x_dev * | dev, |
uint8_t | chn | ||
) |
Get reference voltage based on the reference source.
- Parameters:
-
dev[in] - Device instance chn[in] - ADC channel
- Returns:
- Reference voltage
Definition at line 68 of file ad4130_support.c.
int32_t ad4130_read_fifo | ( | struct ad413x_dev * | dev, |
uint32_t * | data, | ||
uint32_t | adc_samples | ||
) |
Read the data from FIFO.
- Parameters:
-
dev[in] - device instance data[in] - Buffer to store FIFO data adc_samples[in] - Number of ADC samples to read
- Returns:
- 0 in case of success, negative error code otherwise
- Note:
- This function doesn't consider the FIFO status and header information during data readback. It is assumed data user is intending to read only the data from FIFO.
Definition at line 274 of file ad4130_support.c.
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.
- Parameters:
-
dev[in] - Device instance raw_data[in,out]- ADC raw data
- Returns:
- 0 in case of success, negative error code otherwise
Definition at line 195 of file ad4130_support.c.
int32_t ad413x_set_filter_fs | ( | struct ad413x_dev * | dev, |
uint32_t | fs, | ||
uint8_t | preset | ||
) |
Set filter FS value.
- Parameters:
-
dev[in] - Device instance fs[in]- FS value preset[in] - Channel setup
- Returns:
- 0 in case of success, negative error code otherwise
Definition at line 362 of file ad4130_support.c.
int32_t ad413x_set_int_source | ( | struct ad413x_dev * | dev, |
adc_conv_int_source_e | conv_int_source | ||
) |
Set interrupt conversion source (GPIO)
- Parameters:
-
dev[in] - Device instance conv_int_source[in]- Interrupt source
- Returns:
- 0 in case of success, negative error code otherwise
Definition at line 335 of file ad4130_support.c.
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.
- Parameters:
-
dev[in] - Device instance adc_raw[in] - ADC raw sample rtd_ref[in] - RTD reference resistance in ohms chn[in] - ADC channel
- Returns:
- RTD resistance value
- Note:
- RTD is biased with constant excitation current. Below formula is based on ratiometric measurement, where fixed value of RTD RREF (reference resistor) and gain is taken into account
Definition at line 170 of file ad4130_support.c.
float convert_adc_sample_into_voltage | ( | void * | dev, |
uint32_t | adc_raw, | ||
uint8_t | chn | ||
) |
Convert the ADC raw value into equivalent voltage.
- Parameters:
-
dev[in] - Device instance adc_raw[in]- ADC raw data chn[in] - ADC channel
- Returns:
- ADC voltage value
Definition at line 139 of file ad4130_support.c.
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.
- Parameters:
-
dev[in] - Device instance adc_raw_data[in] - ADC raw value chn[in] - ADC Channel
- Returns:
- ADC data after signed conversion
Definition at line 112 of file ad4130_support.c.
Generated on Wed Jul 20 2022 12:42:25 by 1.7.2