precision-converters-firmware
|
AD4130 device No-OS driver supports. More...
#include <stdint.h>
#include "app_config.h"
#include "ad4130_support.h"
#include "ad4130_user_config.h"
#include "no_os_error.h"
Macros | |
#define | AD4130_FIFO_MAX_SIZE (256) |
#define | AD4130_FIFO_READ_CMD_BYTES (2) |
#define | BYTE_SIZE (8) |
#define | CONV_MON_GPIO_TIMEOUT (10000) |
#define | FIFO_BUSY_TIME (20) |
Functions | |
float | ad4130_get_reference_voltage (struct ad413x_dev *dev, uint8_t chn) |
Get reference voltage based on the reference source. More... | |
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. More... | |
float | convert_adc_sample_into_voltage (void *dev, uint32_t adc_raw, uint8_t chn) |
Convert the ADC raw value into equivalent voltage. More... | |
float | convert_adc_data_to_voltage_without_vref (void *dev, int32_t data, uint8_t chn) |
Convert ADC data to voltage without Vref. More... | |
float | convert_adc_data_to_voltage_wrt_vref (void *dev, int32_t data, uint8_t chn) |
Convert ADC data to voltage w.r.t Vref. More... | |
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. More... | |
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. More... | |
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. More... | |
int32_t | ad4130_read_fifo (struct ad413x_dev *dev, uint32_t *data, uint32_t adc_samples) |
Read the data from FIFO. More... | |
int32_t | ad413x_set_int_source (struct ad413x_dev *dev, adc_conv_int_source_e conv_int_source) |
Set interrupt conversion source (GPIO) More... | |
int32_t | ad413x_set_filter_fs (struct ad413x_dev *dev, uint32_t fs, uint8_t preset) |
Set filter FS value. More... | |
AD4130 device 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.
#define AD4130_FIFO_MAX_SIZE (256) |
#define AD4130_FIFO_READ_CMD_BYTES (2) |
#define BYTE_SIZE (8) |
#define CONV_MON_GPIO_TIMEOUT (10000) |
#define FIFO_BUSY_TIME (20) |
float ad4130_get_reference_voltage | ( | struct ad413x_dev * | dev, |
uint8_t | chn | ||
) |
Get reference voltage based on the reference source.
dev[in] | - Device instance |
chn[in] | - ADC channel |
int32_t ad4130_read_fifo | ( | struct ad413x_dev * | dev, |
uint32_t * | data, | ||
uint32_t | adc_samples | ||
) |
Read the data from FIFO.
dev[in] | - device instance |
data[in] | - Buffer to store FIFO data |
adc_samples[in] | - Number of ADC samples to read |
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.
dev[in] | - Device instance |
raw_data[in,out]- | ADC raw data |
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.
dev[in] | - Device instance |
input_chn[in] | - Input channel to be sampled and read data for |
adc_raw[in,out]- | ADC raw data |
int32_t ad413x_set_filter_fs | ( | struct ad413x_dev * | dev, |
uint32_t | fs, | ||
uint8_t | preset | ||
) |
Set filter FS value.
dev[in] | - Device instance |
fs[in]- | FS value |
preset[in] | - Channel setup |
int32_t ad413x_set_int_source | ( | struct ad413x_dev * | dev, |
adc_conv_int_source_e | conv_int_source | ||
) |
Set interrupt conversion source (GPIO)
dev[in] | - Device instance |
conv_int_source[in]- | Interrupt source |
float convert_adc_data_to_voltage_without_vref | ( | void * | dev, |
int32_t | data, | ||
uint8_t | chn | ||
) |
Convert ADC data to voltage without Vref.
dev[in] | - Device instance |
data[in] | - ADC data in straight binary format (signed) |
chn[in] | - ADC channel |
float convert_adc_data_to_voltage_wrt_vref | ( | void * | dev, |
int32_t | data, | ||
uint8_t | chn | ||
) |
Convert ADC data to voltage w.r.t Vref.
dev[in] | - Device instance |
data[in] | - ADC data in straight binary format (signed) |
chn[in] | - ADC channel |
float convert_adc_raw_into_rtd_resistance | ( | void * | dev, |
uint32_t | adc_raw, | ||
float | rtd_ref, | ||
uint8_t | chn | ||
) |
float convert_adc_sample_into_voltage | ( | void * | dev, |
uint32_t | adc_raw, | ||
uint8_t | chn | ||
) |
Convert the ADC raw value into equivalent voltage.
dev[in] | - Device instance |
adc_raw[in]- | ADC raw data |
chn[in] | - ADC channel |
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.
dev[in] | - Device instance |
adc_raw_data[in] | - ADC raw value |
chn[in] | - ADC Channel |