precision-converters-firmware
Macros | Functions
ad777x_support.c File Reference
#include "ad777x_support.h"
#include "no_os_error.h"
#include "ad777x_iio.h"
#include "app_config.h"
#include "no_os_util.h"
Include dependency graph for ad777x_support.c:

Macros

#define AD777x_DOUT_FORMAT_SELECT   0x2
 
#define AD777x_DATA_BYTES   3
 
#define SAR_CONV_DELAY_USEC   1
 
#define SAR_ACQ_DELAY_USEC   1
 

Functions

int32_t ad777x_raw_data_read (ad7779_dev *dev, uint8_t ch_num, uint32_t *sd_adc_code)
 Read the SD ADC Code. More...
 
int32_t ad777x_read_all_channels (ad7779_dev *dev, uint32_t *sd_adc_code)
 Read the SD ADC Code of all channels. More...
 
int32_t ad777x_enable_single_dout (ad7779_dev *dev)
 Enable single DOUT for all 8 channels. More...
 
int32_t ad7779_sar_data_read (ad7779_dev *dev, ad7779_sar_mux mux, uint16_t *sar_code)
 Read SAR ADC data. More...
 

Macro Definition Documentation

◆ AD777x_DATA_BYTES

#define AD777x_DATA_BYTES   3

◆ AD777x_DOUT_FORMAT_SELECT

#define AD777x_DOUT_FORMAT_SELECT   0x2

◆ SAR_ACQ_DELAY_USEC

#define SAR_ACQ_DELAY_USEC   1

◆ SAR_CONV_DELAY_USEC

#define SAR_CONV_DELAY_USEC   1

Function Documentation

◆ ad7779_sar_data_read()

int32_t ad7779_sar_data_read ( ad7779_dev *  dev,
ad7779_sar_mux  mux,
uint16_t *  sar_code 
)

Read SAR ADC data.

Parameters
dev[in]-Pointer to IIO device instance
mux[in] - SAR mux configuration
sar_code[out] - SAR ADC code
Returns
0 in case of success, negative error code otherwise

◆ ad777x_enable_single_dout()

int32_t ad777x_enable_single_dout ( ad7779_dev *  dev)

Enable single DOUT for all 8 channels.

Parameters
dev[in]-Pointer to IIO device instance
Returns
0 in case of success, negative error code otherwise

◆ ad777x_raw_data_read()

int32_t ad777x_raw_data_read ( ad7779_dev *  dev,
uint8_t  ch_num,
uint32_t *  sd_adc_code 
)

Read the SD ADC Code.

Parameters
dev[in]-Pointer to IIO device instance
ch_num[in]- Channel Id (Number)
sd_adc_code[out]-ADC Raw data
Returns
0 in case of success, negative error code otherwise

◆ ad777x_read_all_channels()

int32_t ad777x_read_all_channels ( ad7779_dev *  dev,
uint32_t *  sd_adc_code 
)

Read the SD ADC Code of all channels.

Parameters
dev[in]-Pointer to IIO device instance
sd_adc_code[out]-ADC Raw data
Returns
0 in case of success, negative error code otherwise