precision-converters-firmware
Macros | Functions
ad7606_support.c File Reference

AD7606 No-OS drivers support functionality. More...

#include <stdint.h>
#include "app_config.h"
#include "ad7606_support.h"
#include "no_os_error.h"
Include dependency graph for ad7606_support.c:

Macros

#define SAMPLE_SIZE_IN_BYTE   2
 

Functions

polarity_e ad7606_get_input_polarity (uint8_t chn_range_bits)
 Function to get the polarity of analog input. More...
 
int32_t ad7606_read_single_sample (struct ad7606_dev *dev, uint32_t *adc_data, uint8_t chn)
 Perform conversion and read single conversion sample. More...
 
int32_t ad7606_read_converted_sample (struct ad7606_dev *dev, uint32_t *adc_data, uint8_t input_chn)
 Read ADC raw data for recently sampled channel. More...
 

Detailed Description

AD7606 No-OS drivers support functionality.

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.

Macro Definition Documentation

◆ SAMPLE_SIZE_IN_BYTE

#define SAMPLE_SIZE_IN_BYTE   2

Function Documentation

◆ ad7606_get_input_polarity()

polarity_e ad7606_get_input_polarity ( uint8_t  chn_range_bits)

Function to get the polarity of analog input.

Parameters
chn_range_bits[in]- Bits from the channel range register
Returns
UNIPOLAR or BIPOLAR

◆ ad7606_read_converted_sample()

int32_t ad7606_read_converted_sample ( struct ad7606_dev *  dev,
uint32_t *  adc_data,
uint8_t  input_chn 
)

Read ADC raw data for recently sampled channel.

Parameters
dev[in]- AD7606 device instance
adc_data[in,out]- Pointer to adc data read variable
input_chn[in]- Input channel
Returns
0 in case of success, negative error code otherwise

◆ ad7606_read_single_sample()

int32_t ad7606_read_single_sample ( struct ad7606_dev *  dev,
uint32_t *  adc_data,
uint8_t  chn 
)

Perform conversion and read single conversion sample.

Parameters
dev[in]- AD7606 device instance
adc_data[in,out]- Pointer to adc data read variable
chn[in]- Channel for which data is to read
Returns
0 in case of success, negative error code otherwise