no-OS
Classes | Macros | Enumerations | Functions
ad719x.h File Reference

Header file of AD7190/2/3/4/5 Driver. More...

#include <stdint.h>
#include "no_os_gpio.h"
#include "no_os_spi.h"
#include "no_os_util.h"
Include dependency graph for ad719x.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ad719x_dev
 
struct  ad719x_init_param
 

Macros

#define AD719X_SLAVE_ID   1
 
#define AD719X_REG_COMM   0
 
#define AD719X_REG_STAT   0
 
#define AD719X_REG_MODE   1
 
#define AD719X_REG_CONF   2
 
#define AD719X_REG_DATA   3
 
#define AD719X_REG_ID   4
 
#define AD719X_REG_GPOCON   5
 
#define AD719X_REG_OFFSET   6
 
#define AD719X_REG_FULLSCALE   7
 
#define AD719X_COMM_WEN   (1 << 7)
 
#define AD719X_COMM_WRITE   (0 << 6)
 
#define AD719X_COMM_READ   (1 << 6)
 
#define AD719X_COMM_ADDR(x)   (((x) & 0x7) << 3)
 
#define AD719X_COMM_CREAD   (1 << 2)
 
#define AD719X_STAT_RDY   (1 << 7)
 
#define AD719X_STAT_ERR   (1 << 6)
 
#define AD719X_STAT_NOREF   (1 << 5)
 
#define AD719X_STAT_PARITY   (1 << 4)
 
#define AD719X_STAT_CH3   (1 << 3)
 
#define AD719X_STAT_CH2   (1 << 2)
 
#define AD719X_STAT_CH1   (1 << 1)
 
#define AD719X_STAT_CH0   (1 << 0)
 
#define AD719X_MODE_SEL(x)   (((uint32_t)(x) & 0x7) << 21)
 
#define AD719X_MODE_DAT_STA   ((uint32_t)1 << 20)
 
#define AD719X_MODE_CLKSRC(x)   (((uint32_t)(x) & 0x3) << 18)
 
#define AD719X_MODE_AVG(x)   (((uint32_t)(x) & 0x3) << 16)
 
#define AD719X_MODE_SINC3   (1 << 15)
 
#define AD719X_MODE_ENPAR   (1 << 13)
 
#define AD719X_MODE_CLKDIV   (1 << 12)
 
#define AD719X_MODE_SCYCLE   (1 << 11)
 
#define AD719X_MODE_REJ60   (1 << 10)
 
#define AD719X_MODE_RATE(x)   ((x) & 0x3FF)
 
#define AD719X_AVG_NONE   0
 
#define AD719X_AVG_BY_2   1
 
#define AD719X_AVG_BY_8   2
 
#define AD719X_AVG_BY_16   3
 
#define AD719X_CONF_CHOP   ((uint32_t)1 << 23)
 
#define AD719X_CONF_REFSEL   ((uint32_t)1 << 20)
 
#define AD719X_CONF_PSEUDO   ((uint32_t)1 << 18)
 
#define AD719X_CONF_CHAN(x)   ((uint32_t)((x) & 0x3FF) << 8)
 
#define AD719X_CONF_BURN   (1 << 7)
 
#define AD719X_CONF_REFDET   (1 << 6)
 
#define AD719X_CONF_BUF   (1 << 4)
 
#define AD719X_CONF_UNIPOLAR   (1 << 3)
 
#define AD719X_CONF_GAIN(x)   ((x) & 0x7)
 
#define AD719X_CH_MASK(channel)   NO_OS_BIT(channel)
 
#define AD719X_CH_0   0
 
#define AD719X_CH_1   1
 
#define AD719X_CH_2   2
 
#define AD719X_CH_3   3
 
#define AD719X_CH_4   4
 
#define AD719X_CH_5   5
 
#define AD719X_CH_6   6
 
#define AD719X_CH_7   7
 
#define AD719X_CH_TEMP   8
 
#define AD719X_CH_SHORT   9
 
#define AD7190_4_ID_MASK   0x0F
 
#define AD7195_ID_MASK   0xFF
 
#define AD719X_GPOCON_BPDSW   (1 << 6)
 
#define AD719X_GPOCON_GP32EN   (1 << 5)
 
#define AD719X_GPOCON_GP10EN   (1 << 4)
 
#define AD719X_GPOCON_P3DAT   (1 << 3)
 
#define AD719X_GPOCON_P2DAT   (1 << 2)
 
#define AD719X_GPOCON_P1DAT   (1 << 1)
 
#define AD719X_GPOCON_P0DAT   (1 << 0)
 

Enumerations

enum  ad719x_adc_gain {
  AD719X_ADC_GAIN_1 = 0,
  AD719X_ADC_GAIN_8 = 3,
  AD719X_ADC_GAIN_16 = 4,
  AD719X_ADC_GAIN_32 = 5,
  AD719X_ADC_GAIN_64 = 6,
  AD719X_ADC_GAIN_128 = 7
}
 
enum  ad719x_adc_clock {
  AD719X_EXT_CRYSTAL_MCLK1_MCLK2,
  AD719X_EXT_CRYSTAL_MCLK2,
  AD719X_INT_CLK_4_92_MHZ_TRIST,
  AD719X_INT_CLK_4_92_MHZ
}
 
enum  ad719x_adc_modes {
  AD719X_MODE_CONT,
  AD719X_MODE_SINGLE,
  AD719X_MODE_IDLE,
  AD719X_MODE_PWRDN,
  AD719X_MODE_CAL_INT_ZERO,
  AD719X_MODE_CAL_INT_FULL,
  AD719X_MODE_CAL_SYS_ZERO,
  AD719X_MODE_CAL_SYS_FULL
}
 
enum  ad719x_chip_id {
  AD7190 = 0x4,
  AD7192 = 0x0,
  AD7193 = 0x2,
  AD7194 = 0x3,
  AD7195 = 0xA6
}
 

Functions

int ad719x_init (struct ad719x_dev **device, struct ad719x_init_param init_param)
 Initializes the communication peripheral and the initial Values for AD719X Board and resets the device. More...
 
int ad719x_remove (struct ad719x_dev *dev)
 Free the resources allocated by ad719x_init(). More...
 
int ad719x_set_register_value (struct ad719x_dev *dev, uint8_t reg_addr, uint32_t reg_value, uint8_t bytes_number)
 Writes data into a register. More...
 
int ad719x_get_register_value (struct ad719x_dev *dev, uint8_t reg_addr, uint8_t bytes_number, uint32_t *reg_data)
 Reads the value of a register. More...
 
int ad719x_set_masked_register_value (struct ad719x_dev *dev, uint8_t reg_addr, uint32_t mask, uint32_t data, uint8_t bytes)
 Write masked data into device register. More...
 
int ad719x_reset (struct ad719x_dev *dev)
 Resets the device. More...
 
int ad719x_set_operating_mode (struct ad719x_dev *dev, enum ad719x_adc_modes opt_mode)
 Sets device into the specified operating mode. More...
 
int ad719x_wait_rdy_go_low (struct ad719x_dev *dev)
 Waits for RDY pin to go low. More...
 
int ad719x_channels_select (struct ad719x_dev *dev, uint16_t chn_mask)
 Selects the channels to be enabled. More...
 
int ad719x_calibrate (struct ad719x_dev *dev, uint8_t mode, uint8_t channel)
 Performs the given calibration to the specified channel. More...
 
int ad719x_config_input_mode (struct ad719x_dev *dev, uint8_t mode)
 Configures the input mode of the ADC. More...
 
int ad719x_buffer_select (struct ad719x_dev *dev, uint8_t buff_en)
 Enables or disables the buffer on the ADC input channels. More...
 
int ad719x_output_rate_select (struct ad719x_dev *dev, uint16_t out_rate_code)
 Selects the filter output data rate of the ADC. More...
 
int ad719x_clock_select (struct ad719x_dev *dev, enum ad719x_adc_clock clk_select)
 Selects the clock source of the ADC. More...
 
int ad719x_set_bridge_switch (struct ad719x_dev *dev, uint8_t bpdsw_select)
 Opens or closes the bridge power-down switch of the ADC. More...
 
int ad719x_range_setup (struct ad719x_dev *dev, uint8_t polarity, enum ad719x_adc_gain range)
 Selects the polarity of the conversion and the ADC input range. More...
 
int ad719x_single_conversion (struct ad719x_dev *dev, uint32_t *reg_data)
 Returns the result of a single conversion. More...
 
int ad719x_continuous_read_avg (struct ad719x_dev *dev, uint8_t sample_number, uint32_t *samples_avg)
 Returns the average of several conversion results. More...
 
int ad719x_temperature_read (struct ad719x_dev *dev, float *temp)
 Read data from temperature sensor and converts it to Celsius degrees. More...
 
float ad719x_convert_to_volts (struct ad719x_dev *dev, uint32_t raw_data, float v_ref)
 Converts 24-bit raw data to milivolts. More...
 

Detailed Description

Header file of AD7190/2/3/4/5 Driver.

Author
DNechita (Dan.N.nosp@m.echi.nosp@m.ta@an.nosp@m.alog.nosp@m..com)

Copyright 2012(c) Analog Devices, Inc.

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Macro Definition Documentation

◆ AD7190_4_ID_MASK

#define AD7190_4_ID_MASK   0x0F

◆ AD7195_ID_MASK

#define AD7195_ID_MASK   0xFF

◆ AD719X_AVG_BY_16

#define AD719X_AVG_BY_16   3

◆ AD719X_AVG_BY_2

#define AD719X_AVG_BY_2   1

◆ AD719X_AVG_BY_8

#define AD719X_AVG_BY_8   2

◆ AD719X_AVG_NONE

#define AD719X_AVG_NONE   0

◆ AD719X_CH_0

#define AD719X_CH_0   0

◆ AD719X_CH_1

#define AD719X_CH_1   1

◆ AD719X_CH_2

#define AD719X_CH_2   2

◆ AD719X_CH_3

#define AD719X_CH_3   3

◆ AD719X_CH_4

#define AD719X_CH_4   4

◆ AD719X_CH_5

#define AD719X_CH_5   5

◆ AD719X_CH_6

#define AD719X_CH_6   6

◆ AD719X_CH_7

#define AD719X_CH_7   7

◆ AD719X_CH_MASK

#define AD719X_CH_MASK (   channel)    NO_OS_BIT(channel)

◆ AD719X_CH_SHORT

#define AD719X_CH_SHORT   9

◆ AD719X_CH_TEMP

#define AD719X_CH_TEMP   8

◆ AD719X_COMM_ADDR

#define AD719X_COMM_ADDR (   x)    (((x) & 0x7) << 3)

◆ AD719X_COMM_CREAD

#define AD719X_COMM_CREAD   (1 << 2)

◆ AD719X_COMM_READ

#define AD719X_COMM_READ   (1 << 6)

◆ AD719X_COMM_WEN

#define AD719X_COMM_WEN   (1 << 7)

◆ AD719X_COMM_WRITE

#define AD719X_COMM_WRITE   (0 << 6)

◆ AD719X_CONF_BUF

#define AD719X_CONF_BUF   (1 << 4)

◆ AD719X_CONF_BURN

#define AD719X_CONF_BURN   (1 << 7)

◆ AD719X_CONF_CHAN

#define AD719X_CONF_CHAN (   x)    ((uint32_t)((x) & 0x3FF) << 8)

◆ AD719X_CONF_CHOP

#define AD719X_CONF_CHOP   ((uint32_t)1 << 23)

◆ AD719X_CONF_GAIN

#define AD719X_CONF_GAIN (   x)    ((x) & 0x7)

◆ AD719X_CONF_PSEUDO

#define AD719X_CONF_PSEUDO   ((uint32_t)1 << 18)

◆ AD719X_CONF_REFDET

#define AD719X_CONF_REFDET   (1 << 6)

◆ AD719X_CONF_REFSEL

#define AD719X_CONF_REFSEL   ((uint32_t)1 << 20)

◆ AD719X_CONF_UNIPOLAR

#define AD719X_CONF_UNIPOLAR   (1 << 3)

◆ AD719X_GPOCON_BPDSW

#define AD719X_GPOCON_BPDSW   (1 << 6)

◆ AD719X_GPOCON_GP10EN

#define AD719X_GPOCON_GP10EN   (1 << 4)

◆ AD719X_GPOCON_GP32EN

#define AD719X_GPOCON_GP32EN   (1 << 5)

◆ AD719X_GPOCON_P0DAT

#define AD719X_GPOCON_P0DAT   (1 << 0)

◆ AD719X_GPOCON_P1DAT

#define AD719X_GPOCON_P1DAT   (1 << 1)

◆ AD719X_GPOCON_P2DAT

#define AD719X_GPOCON_P2DAT   (1 << 2)

◆ AD719X_GPOCON_P3DAT

#define AD719X_GPOCON_P3DAT   (1 << 3)

◆ AD719X_MODE_AVG

#define AD719X_MODE_AVG (   x)    (((uint32_t)(x) & 0x3) << 16)

◆ AD719X_MODE_CLKDIV

#define AD719X_MODE_CLKDIV   (1 << 12)

◆ AD719X_MODE_CLKSRC

#define AD719X_MODE_CLKSRC (   x)    (((uint32_t)(x) & 0x3) << 18)

◆ AD719X_MODE_DAT_STA

#define AD719X_MODE_DAT_STA   ((uint32_t)1 << 20)

◆ AD719X_MODE_ENPAR

#define AD719X_MODE_ENPAR   (1 << 13)

◆ AD719X_MODE_RATE

#define AD719X_MODE_RATE (   x)    ((x) & 0x3FF)

◆ AD719X_MODE_REJ60

#define AD719X_MODE_REJ60   (1 << 10)

◆ AD719X_MODE_SCYCLE

#define AD719X_MODE_SCYCLE   (1 << 11)

◆ AD719X_MODE_SEL

#define AD719X_MODE_SEL (   x)    (((uint32_t)(x) & 0x7) << 21)

◆ AD719X_MODE_SINC3

#define AD719X_MODE_SINC3   (1 << 15)

◆ AD719X_REG_COMM

#define AD719X_REG_COMM   0

◆ AD719X_REG_CONF

#define AD719X_REG_CONF   2

◆ AD719X_REG_DATA

#define AD719X_REG_DATA   3

◆ AD719X_REG_FULLSCALE

#define AD719X_REG_FULLSCALE   7

◆ AD719X_REG_GPOCON

#define AD719X_REG_GPOCON   5

◆ AD719X_REG_ID

#define AD719X_REG_ID   4

◆ AD719X_REG_MODE

#define AD719X_REG_MODE   1

◆ AD719X_REG_OFFSET

#define AD719X_REG_OFFSET   6

◆ AD719X_REG_STAT

#define AD719X_REG_STAT   0

◆ AD719X_SLAVE_ID

#define AD719X_SLAVE_ID   1

◆ AD719X_STAT_CH0

#define AD719X_STAT_CH0   (1 << 0)

◆ AD719X_STAT_CH1

#define AD719X_STAT_CH1   (1 << 1)

◆ AD719X_STAT_CH2

#define AD719X_STAT_CH2   (1 << 2)

◆ AD719X_STAT_CH3

#define AD719X_STAT_CH3   (1 << 3)

◆ AD719X_STAT_ERR

#define AD719X_STAT_ERR   (1 << 6)

◆ AD719X_STAT_NOREF

#define AD719X_STAT_NOREF   (1 << 5)

◆ AD719X_STAT_PARITY

#define AD719X_STAT_PARITY   (1 << 4)

◆ AD719X_STAT_RDY

#define AD719X_STAT_RDY   (1 << 7)

Enumeration Type Documentation

◆ ad719x_adc_clock

Enumerator
AD719X_EXT_CRYSTAL_MCLK1_MCLK2 
AD719X_EXT_CRYSTAL_MCLK2 
AD719X_INT_CLK_4_92_MHZ_TRIST 
AD719X_INT_CLK_4_92_MHZ 

◆ ad719x_adc_gain

Enumerator
AD719X_ADC_GAIN_1 
AD719X_ADC_GAIN_8 
AD719X_ADC_GAIN_16 
AD719X_ADC_GAIN_32 
AD719X_ADC_GAIN_64 
AD719X_ADC_GAIN_128 

◆ ad719x_adc_modes

Enumerator
AD719X_MODE_CONT 
AD719X_MODE_SINGLE 
AD719X_MODE_IDLE 
AD719X_MODE_PWRDN 
AD719X_MODE_CAL_INT_ZERO 
AD719X_MODE_CAL_INT_FULL 
AD719X_MODE_CAL_SYS_ZERO 
AD719X_MODE_CAL_SYS_FULL 

◆ ad719x_chip_id

Enumerator
AD7190 
AD7192 
AD7193 
AD7194 
AD7195 

Function Documentation

◆ ad719x_buffer_select()

int ad719x_buffer_select ( struct ad719x_dev dev,
uint8_t  buff_en 
)

Enables or disables the buffer on the ADC input channels.

Enables or disables the buffer on the ADC input channels

Parameters
dev- The device structure.
buff_en- Enable/disable option. Example: 0 - Buffer disabled 1 - Buffer Enabled
Returns
0 in case of success or negative error code.
Here is the caller graph for this function:

◆ ad719x_calibrate()

int ad719x_calibrate ( struct ad719x_dev dev,
uint8_t  mode,
uint8_t  channel 
)

Performs the given calibration to the specified channel.

Performs the given calibration to the specified channel.

Parameters
dev- The device structure.
mode- Calibration type.
channel- Channel to be calibrated.
Returns
0 in case of success or negative error code.

◆ ad719x_channels_select()

int ad719x_channels_select ( struct ad719x_dev dev,
uint16_t  chn_mask 
)

Selects the channels to be enabled.

Selects the channels to be enabled.

Parameters
dev- The device structure.
chn_mask- Channel mask. Example: AD719X_CH_0 - AIN1(+) - AIN2(-); (Pseudo = 0) AD719X_CH_1 - AIN3(+) - AIN4(-); (Pseudo = 0) AD719X_TEMP - Temperature sensor AD719X_SHORT - AIN2(+) - AIN2(-); (Pseudo = 0)
Returns
0 in case of success or negative error code.
Here is the caller graph for this function:

◆ ad719x_clock_select()

int ad719x_clock_select ( struct ad719x_dev dev,
enum ad719x_adc_clock  clk_select 
)

Selects the clock source of the ADC.

Selects the clock source of the ADC

Parameters
dev- The device structure.
clk_select- Clock source to be selected. Accepted values: AD719X_EXT_CRYSTAL_MCLK1_MCLK2 AD719X_EXT_CRYSTAL_MCLK2 AD719X_INT_CLK_4_92_MHZ_TRIST AD719X_INT_CLK_4_92_MHZ
Returns
0 in case of success or negative error code.
Here is the caller graph for this function:

◆ ad719x_config_input_mode()

int ad719x_config_input_mode ( struct ad719x_dev dev,
uint8_t  mode 
)

Configures the input mode of the ADC.

Configures the input mode of the ADC

Parameters
dev- The device structure.
mode- Mode selection. Example: 0 - Differential Analog Inputs 1 - Pseudo Differential Analog Inputs
Returns
0 in case of success or negative error code.
Here is the caller graph for this function:

◆ ad719x_continuous_read_avg()

int ad719x_continuous_read_avg ( struct ad719x_dev dev,
uint8_t  sample_number,
uint32_t *  samples_avg 
)

Returns the average of several conversion results.

Returns the average of several conversion results.

Parameters
dev- The device structure.
sample_number- the number of samples
samples_avg- Average of the samples read
Returns
0 in case of success or negative error code.
Here is the caller graph for this function:

◆ ad719x_convert_to_volts()

float ad719x_convert_to_volts ( struct ad719x_dev dev,
uint32_t  raw_data,
float  v_ref 
)

Converts 24-bit raw data to milivolts.

Converts 24-bit raw data to volts.

Parameters
dev- The device structure.
raw_data- 24-bit data sample.
v_ref- The value of the voltage reference used by the device.
Returns
voltage - The result of the conversion expressed as volts.
Here is the caller graph for this function:

◆ ad719x_get_register_value()

int ad719x_get_register_value ( struct ad719x_dev dev,
uint8_t  reg_addr,
uint8_t  bytes_number,
uint32_t *  reg_data 
)

Reads the value of a register.

Reads the value of a register.

Parameters
dev- The device structure.
reg_addr- Address of the register.
bytes_number- Number of bytes that will be read.
reg_data- Data read from the register.
Returns
0 in case of success or negative error code.
Here is the caller graph for this function:

◆ ad719x_init()

int ad719x_init ( struct ad719x_dev **  device,
struct ad719x_init_param  init_param 
)

Initializes the communication peripheral and the initial Values for AD719X Board and resets the device.

Checks if the AD7139 part is present.

Parameters
device- The device structure.
init_param- The structure that contains the device initial parameters.
Returns
0 in case of success or negative error code.
Here is the caller graph for this function:

◆ ad719x_output_rate_select()

int ad719x_output_rate_select ( struct ad719x_dev dev,
uint16_t  out_rate_code 
)

Selects the filter output data rate of the ADC.

Selects the filter output data rate of the ADC

Parameters
dev- The device structure.
out_rate_code- Filter output data rate code.
Returns
0 in case of success or negative error code.
Here is the caller graph for this function:

◆ ad719x_range_setup()

int ad719x_range_setup ( struct ad719x_dev dev,
uint8_t  polarity,
enum ad719x_adc_gain  gain 
)

Selects the polarity of the conversion and the ADC input range.

Selects the polarity of the conversion and the ADC input range.

Parameters
dev- The device structure.
polarity- Polarity select bit. Example: 0 - bipolar operation is selected. 1 - unipolar operation is selected.
gain- Gain select bits. These bits are written by the user to select the ADC input range.
Returns
0 in case of success or negative error code.
Here is the caller graph for this function:

◆ ad719x_remove()

int ad719x_remove ( struct ad719x_dev dev)

Free the resources allocated by ad719x_init().

Free the resources allocated by ad719x_init().

Parameters
dev- The device structure.
Returns
0 in case of success or negative error code.

◆ ad719x_reset()

int ad719x_reset ( struct ad719x_dev dev)

Resets the device.

Resets the device.

Parameters
dev- The device structure.
Returns
0 in case of success or negative error code.
Here is the caller graph for this function:

◆ ad719x_set_bridge_switch()

int ad719x_set_bridge_switch ( struct ad719x_dev dev,
uint8_t  bpdsw_select 
)

Opens or closes the bridge power-down switch of the ADC.

Opens or closes the bridge power-down switch of the ADC

Parameters
dev- The device structure.
bpdsw_select- Option to open or close bridge power-down switch. 0 - Switch Opened 1 - Switch Closed
Returns
0 in case of success or negative error code.
Here is the caller graph for this function:

◆ ad719x_set_masked_register_value()

int ad719x_set_masked_register_value ( struct ad719x_dev dev,
uint8_t  reg_addr,
uint32_t  mask,
uint32_t  reg_data,
uint8_t  bytes 
)

Write masked data into device register.

Parameters
dev- The device structure.
reg_addr- Address of the register.
mask- The mask.
reg_data- Register data to be written.
bytes- Number of bytes that will be read.
Returns
0 in case of success or negative error code.
Here is the caller graph for this function:

◆ ad719x_set_operating_mode()

int ad719x_set_operating_mode ( struct ad719x_dev dev,
enum ad719x_adc_modes  opt_mode 
)

Sets device into the specified operating mode.

Set the device into specified operating mode.

Parameters
dev- The device structure.
opt_mode- Operating mode to be set. Accepted values: AD719X_MODE_CONT AD719X_MODE_SINGLE AD719X_MODE_IDLE AD719X_MODE_PWRDN AD719X_MODE_CAL_INT_ZERO AD719X_MODE_CAL_INT_FULL AD719X_MODE_CAL_SYS_ZERO AD719X_MODE_CAL_SYS_FULL
Returns
0 in case of success or negative error code.
Here is the caller graph for this function:

◆ ad719x_set_register_value()

int ad719x_set_register_value ( struct ad719x_dev dev,
uint8_t  reg_addr,
uint32_t  reg_val,
uint8_t  bytes_number 
)

Writes data into a register.

Writes data into a register.

Parameters
dev- The device structure.
reg_addr- Address of the register.
reg_val- Data value to write.
bytes_number- Number of bytes to be written.
Returns
0 in case of success or negative error code.
Here is the caller graph for this function:

◆ ad719x_single_conversion()

int ad719x_single_conversion ( struct ad719x_dev dev,
uint32_t *  reg_data 
)

Returns the result of a single conversion.

Returns the result of a single conversion.

Parameters
dev- The device structure.
reg_data- Buffer to store sampled register data
Returns
0 in case of success or negative error code.
Here is the caller graph for this function:

◆ ad719x_temperature_read()

int ad719x_temperature_read ( struct ad719x_dev dev,
float *  temp 
)

Read data from temperature sensor and converts it to Celsius degrees.

Read data from temperature sensor and converts it to Celsius degrees.

Parameters
dev- The device structure.
temp- Stores the temperature result.
Returns
0 in case of success or negative error code.
Here is the caller graph for this function:

◆ ad719x_wait_rdy_go_low()

int ad719x_wait_rdy_go_low ( struct ad719x_dev dev)

Waits for RDY pin to go low.

Waits for RDY pin to go low.

Returns
0 in case of success or negative error code.
Here is the caller graph for this function: