Analog Devices / Mbed OS EVAL-AD4696

Dependencies:   platform_drivers

Embed: (wiki syntax)

« Back to documentation index

ad4696_data_capture.c File Reference

ad4696_data_capture.c File Reference

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

Go to the source code of this file.

Functions

static int32_t ad4696_save_prev_active_chns (void)
 Save the previous active channels.
static int32_t ad4696_restore_prev_active_chns (void)
 Restore (re-enable) the previous active channels.
static int32_t ad4696_enable_curr_chn (uint8_t chn)
 Enable input channel.
static int32_t ad4696_enable_channel_mask (uint32_t chn_msk)
 Enable input channels according to the mask.
static int32_t ad4696_disable_curr_chn (uint8_t chn)
 Disable input channel.
static int32_t ad4696_disable_all_chns (void)
 Disable all active channels.
static int32_t ad4696_single_sample_read_start_ops (uint8_t input_chn)
 Enable conversion for single data read.
static int32_t ad4696_enable_continuous_read_conversion (uint32_t ch_mask)
 Enable conversion for continuous (sequencing) data read.
static int32_t ad4696_continuous_sample_read_stop_ops (void)
 Disable ADC conversion.
static int32_t ad4696_perform_conv_and_read_sample (uint32_t *read_adc_data)
 Read ADC single sample data.
static int32_t ad4696_read_converted_sample (uint32_t *adc_raw)
 Read ADC raw data for recently sampled channel.
static int32_t ad4696_end_of_conversion_check (void)
 Check for the end of conversion event.

Detailed Description

Data capture interface for AD4696 IIO application.

This module handles the AD4696 data capturing for IIO client

Copyright (c) 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 ad4696_data_capture.c.


Function Documentation

static int32_t ad4696_continuous_sample_read_stop_ops ( void   ) [static]

Disable ADC conversion.

Returns:
SUCCESS in case of success, FAILURE otherwise

Definition at line 335 of file ad4696_data_capture.c.

static int32_t ad4696_disable_all_chns ( void   ) [static]

Disable all active channels.

Returns:
SUCCESS in case of success, FAILURE otherwise

Definition at line 148 of file ad4696_data_capture.c.

static int32_t ad4696_disable_curr_chn ( uint8_t  chn ) [static]

Disable input channel.

Parameters:
chn[in]- Channel to disable
Returns:
SUCCESS in case of success, FAILURE otherwise

Definition at line 231 of file ad4696_data_capture.c.

static int32_t ad4696_enable_channel_mask ( uint32_t  chn_msk ) [static]

Enable input channels according to the mask.

Parameters:
chn_msk[in]- Mask containing channels to be enabled
Returns:
SUCCESS in case of success, FAILURE otherwise

Definition at line 203 of file ad4696_data_capture.c.

static int32_t ad4696_enable_continuous_read_conversion ( uint32_t  ch_mask ) [static]

Enable conversion for continuous (sequencing) data read.

Parameters:
ch_mask[in]- Mask containing channels to be enabled
Returns:
SUCCESS in case of success, FAILURE otherwise

Definition at line 296 of file ad4696_data_capture.c.

static int32_t ad4696_enable_curr_chn ( uint8_t  chn ) [static]

Enable input channel.

Parameters:
chn[in]- Channel to enable
Returns:
SUCCESS in case of success, FAILURE otherwise

Definition at line 172 of file ad4696_data_capture.c.

static int32_t ad4696_end_of_conversion_check ( void   ) [static]

Check for the end of conversion event.

Returns:
SUCCESS in case of success, FAILURE otherwise

This function monitors the state line for BSY pin until timeout is reached

Definition at line 403 of file ad4696_data_capture.c.

static int32_t ad4696_perform_conv_and_read_sample ( uint32_t *  read_adc_data ) [static]

Read ADC single sample data.

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

This function performs the sampling on previously active channels and then reads conversion result

Definition at line 384 of file ad4696_data_capture.c.

static int32_t ad4696_read_converted_sample ( uint32_t *  adc_raw ) [static]

Read ADC raw data for recently sampled channel.

Parameters:
adc_raw[out]- Pointer to adc data read variable
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 366 of file ad4696_data_capture.c.

static int32_t ad4696_restore_prev_active_chns ( void   ) [static]

Restore (re-enable) the previous active channels.

Returns:
SUCCESS in case of success, FAILURE otherwise

Definition at line 122 of file ad4696_data_capture.c.

static int32_t ad4696_save_prev_active_chns ( void   ) [static]

Save the previous active channels.

Returns:
SUCCESS in case of success, FAILURE otherwise

Definition at line 96 of file ad4696_data_capture.c.

static int32_t ad4696_single_sample_read_start_ops ( uint8_t  input_chn ) [static]

Enable conversion for single data read.

Parameters:
input_chn[in]- Channel to be enabled
Returns:
SUCCESS in case of success, FAILURE otherwise

Definition at line 262 of file ad4696_data_capture.c.