precision-converters-firmware
|
#include "ad4170_support.h"
#include "app_config.h"
#include "ad4170_iio.h"
#include "no_os_error.h"
Functions | |
int32_t | ad4170_read_single_sample (uint8_t input_chn, uint32_t *raw_data) |
Read the single ADC sample (raw data) for input channel. More... | |
int32_t | ad4170_read_converted_sample (uint32_t *adc_data) |
Read ADC raw data for recently sampled channel. More... | |
int32_t | perform_sign_conversion (uint32_t adc_raw_data, uint8_t chn) |
Perform the sign conversion for handling negative voltages in bipolar mode. More... | |
float | ad4170_get_gain_value (uint8_t chn) |
Get the actual ADC gain decimal value. More... | |
float | ad4170_get_reference_voltage (uint8_t chn) |
Get the reference voltage based on the reference source. More... | |
float | convert_adc_sample_into_voltage (uint32_t adc_raw, uint8_t chn) |
Convert the ADC raw value into equivalent voltage. More... | |
float | convert_adc_data_to_voltage_without_vref (int32_t data, uint8_t chn) |
Convert ADC data to voltage without Vref. More... | |
float | convert_adc_data_to_voltage_wrt_vref (int32_t data, uint8_t chn) |
Convert ADC data to voltage w.r.t. Vref. More... | |
float | convert_adc_raw_into_rtd_resistance (uint32_t adc_raw, float rtd_ref, uint8_t chn) |
Convert the ADC raw value into equivalent RTD resistance. More... | |
int32_t | ad4170_disable_conversion (void) |
Disable ADC conversion. More... | |
int32_t | ad4170_enable_input_chn (uint8_t input_chn) |
Enable input channel. More... | |
int32_t | ad4170_disable_input_chn (uint8_t input_chn) |
Disable input channel. More... | |
int32_t | ad4170_apply_excitation (uint8_t input_chn) |
Apply the excitation sources. More... | |
int32_t | ad4170_remove_excitation (uint8_t input_chn) |
Remove the excitation sources. More... | |
int32_t | ad4170_set_filter (struct ad4170_dev *dev, uint8_t chn, enum ad4170_filter_type filt_type) |
Set filter type. More... | |
int32_t | ad4170_set_reference (struct ad4170_dev *dev, uint8_t chn, enum ad4170_ref_select ref) |
Set Reference. More... | |
int32_t | ad4170_set_fs (struct ad4170_dev *dev, uint8_t setup, uint8_t chn, uint16_t fs_val) |
Set Reference. More... | |
int32_t ad4170_apply_excitation | ( | uint8_t | input_chn | ) |
Apply the excitation sources.
input_chn[in] | - Input channel |
int32_t ad4170_disable_conversion | ( | void | ) |
Disable ADC conversion.
int32_t ad4170_disable_input_chn | ( | uint8_t | input_chn | ) |
Disable input channel.
input_chn[in] | - Channel to be disabled |
int32_t ad4170_enable_input_chn | ( | uint8_t | input_chn | ) |
Enable input channel.
input_chn[in] | - Channel to be enabled |
float ad4170_get_gain_value | ( | uint8_t | chn | ) |
Get the actual ADC gain decimal value.
chn[in] | - ADC channel |
float ad4170_get_reference_voltage | ( | uint8_t | chn | ) |
Get the reference voltage based on the reference source.
chn[in] | - ADC channel |
int32_t ad4170_read_converted_sample | ( | uint32_t * | adc_data | ) |
Read ADC raw data for recently sampled channel.
adc_data[in,out] | - Pointer to adc data read variable |
int32_t ad4170_read_single_sample | ( | uint8_t | input_chn, |
uint32_t * | raw_data | ||
) |
Read the single ADC sample (raw data) for input channel.
input_chn[in] | - Input channel to be sampled and read data for |
raw_data[in,out]- | ADC raw data |
int32_t ad4170_remove_excitation | ( | uint8_t | input_chn | ) |
Remove the excitation sources.
input_chn[in] | - Input channel |
int32_t ad4170_set_filter | ( | struct ad4170_dev * | dev, |
uint8_t | chn, | ||
enum ad4170_filter_type | filt_type | ||
) |
Set filter type.
dev[in,out] | - AD4170 device descriptor |
chn[in] | - Channel ID |
filt_type[in] | - Filter Type |
int32_t ad4170_set_fs | ( | struct ad4170_dev * | dev, |
uint8_t | setup, | ||
uint8_t | chn, | ||
uint16_t | fs_val | ||
) |
Set Reference.
dev[in,out] | - AD4170 device descriptor |
setup[in] | - Setup ID |
chn[in] | - Channel ID |
ref[in] | - Reference Type |
int32_t ad4170_set_reference | ( | struct ad4170_dev * | dev, |
uint8_t | chn, | ||
enum ad4170_ref_select | ref | ||
) |
Set Reference.
dev[in,out] | - AD4170 device descriptor |
chn[in] | - Channel ID |
ref[in] | - Reference Type |
float convert_adc_data_to_voltage_without_vref | ( | int32_t | data, |
uint8_t | chn | ||
) |
Convert ADC data to voltage without Vref.
data[in] | - ADC data in straight binary format (signed) |
chn[in] | - ADC channel |
float convert_adc_data_to_voltage_wrt_vref | ( | int32_t | data, |
uint8_t | chn | ||
) |
Convert ADC data to voltage w.r.t. Vref.
data[in] | - ADC data in straight binary format (signed) |
chn[in] | - ADC channel |
float convert_adc_raw_into_rtd_resistance | ( | uint32_t | adc_raw, |
float | rtd_ref, | ||
uint8_t | chn | ||
) |
float convert_adc_sample_into_voltage | ( | uint32_t | adc_raw, |
uint8_t | chn | ||
) |
Convert the ADC raw value into equivalent voltage.
adc_raw[in]- | ADC raw data |
chn[in] | - ADC channel |
int32_t perform_sign_conversion | ( | uint32_t | adc_raw_data, |
uint8_t | chn | ||
) |
Perform the sign conversion for handling negative voltages in bipolar mode.
adc_raw_data[in] | - ADC raw value |
chn[in] | - ADC Channel |