Example Program for EVAL-AD7606

Dependencies:   platform_drivers

Embed: (wiki syntax)

« Back to documentation index

ad7606_data_capture.c File Reference

ad7606_data_capture.c File Reference

Data capture interface for AD7606 IIO application. More...

Go to the source code of this file.

Functions

static int32_t ad7606_perform_conv_and_read_sample (uint32_t *adc_data, uint8_t chn)
 Perform conversion and read conversion sample.
static int32_t ad7606_continuous_sample_read_start_ops (uint32_t chn_mask)
 Perform the operations required before starting continuous sample read.
static int32_t ad7606_read_converted_sample (uint32_t *adc_data, uint8_t input_chn)
 Read ADC raw data for recently sampled channel.
static int32_t ad7606_trigger_next_conversion (void)
 Trigger next ADC conversion.
static int32_t reformat_adc_raw_data (uint32_t adc_raw_data, polarity_e polarity)
 Remove the offset from data to change output data format to normal or stright binary representation (needed for IIO client)

Detailed Description

Data capture interface for AD7606 IIO application.

This module handles the AD7606 data capturing

Copyright (c) 2020-2021 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 ad7606_data_capture.c.


Function Documentation

int32_t ad7606_continuous_sample_read_start_ops ( uint32_t  chn_mask ) [static]

Perform the operations required before starting continuous sample read.

Parameters:
chn_mask[in]- active channels list received from IIO client
Returns:
SUCCESS in case of success, FAILURE otherwise

Definition at line 157 of file ad7606_data_capture.c.

int32_t ad7606_perform_conv_and_read_sample ( uint32_t *  adc_data,
uint8_t  chn 
) [static]

Perform conversion and read conversion sample.

Parameters:
adc_data[out]- Pointer to adc data read variable
chn[in]- Channel for which data is to read
Returns:
SUCCESS in case of success, FAILURE otherwise

Definition at line 117 of file ad7606_data_capture.c.

int32_t ad7606_read_converted_sample ( uint32_t *  adc_data,
uint8_t  input_chn 
) [static]

Read ADC raw data for recently sampled channel.

Parameters:
adc_data[out]- Pointer to adc data read variable
input_chn[in]- Input channel
Returns:
SUCCESS in case of success, FAILURE otherwise
Note:
This function is intended to call from the conversion end trigger event. Therefore, this function should just read raw ADC data without further monitoring conversion end event

Definition at line 192 of file ad7606_data_capture.c.

int32_t ad7606_trigger_next_conversion ( void   ) [static]

Trigger next ADC conversion.

Returns:
SUCCESS in case of success, FAILURE otherwise

Definition at line 233 of file ad7606_data_capture.c.

static int32_t reformat_adc_raw_data ( uint32_t  adc_raw_data,
polarity_e  polarity 
) [static]

Remove the offset from data to change output data format to normal or stright binary representation (needed for IIO client)

Parameters:
adc_raw[out]- Pointer to adc data read variable
bipolar[in]- Channel polarity
Returns:
SUCCESS in case of success, FAILURE otherwise

Definition at line 86 of file ad7606_data_capture.c.