precision-converters-firmware
Macros | Enumerations | Functions
ad469x_support.h File Reference

Header for AD469x No-OS driver supports. More...

#include "ad469x.h"
#include "no_os_util.h"
Include dependency graph for ad469x_support.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define NUM_OF_REGISTERS   0x17F
 
#define AD469x_TEMPERATURE_MSK   NO_OS_GENMASK(0,0)
 
#define AD469x_SEQ_LB_CONFIG(x)   ( x & NO_OS_GENMASK(7,0))
 
#define AD469x_SEQ_UB_CONFIG(x)   ( x >> 8)
 
#define AD469x_REG_SEQ_LB   AD469x_REG_STD_SEQ_CONFIG
 
#define AD469x_REG_SEQ_UB   (AD469x_REG_STD_SEQ_CONFIG + 0x01)
 
#define AD469x_SINGLE_CHANNEL_EN(x)   AD469x_CHANNEL(x)
 
#define AD469x_SEQ_CHANNELS_RESET   0x00
 
#define AD469x_EN_AUTOCYLE_MODE   0x01
 
#define AD469x_REG_SETUP_RESET   0x10
 
#define AD469x_REG_SEQ_CTRL_RESET   0x80
 
#define AD469x_SEQ_CHANNEL_EN   1
 
#define AD469x_SEQ_CHANNEL_DI   0
 

Enumerations

enum  ad469x_polarity_select {
  AD469x_UNIPOLAR_MODE ,
  AD469x_PSEUDO_BIPOLAR_MODE
}
 Channel polarity modes. More...
 

Functions

int32_t ad469x_polarity_mode_select (struct ad469x_dev *device, enum ad469x_polarity_select polarity_sel)
 Select between polarity modes. More...
 
int32_t ad469x_reference_config (struct ad469x_dev *device)
 Configures the reference voltage setting. More...
 
int32_t ad469x_trigger_conversion (struct ad469x_dev *device)
 Toggles conversion pin to trigger a new conversion. More...
 
int32_t ad469x_read_single_sample (struct ad469x_dev *device, uint8_t chn_num, uint32_t *data)
 Read single sample from the ADC. More...
 

Detailed Description

Header for AD469x No-OS driver supports.

Copyright (c) 2021-23 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

◆ AD469x_EN_AUTOCYLE_MODE

#define AD469x_EN_AUTOCYLE_MODE   0x01

◆ AD469x_REG_SEQ_CTRL_RESET

#define AD469x_REG_SEQ_CTRL_RESET   0x80

◆ AD469x_REG_SEQ_LB

#define AD469x_REG_SEQ_LB   AD469x_REG_STD_SEQ_CONFIG

◆ AD469x_REG_SEQ_UB

#define AD469x_REG_SEQ_UB   (AD469x_REG_STD_SEQ_CONFIG + 0x01)

◆ AD469x_REG_SETUP_RESET

#define AD469x_REG_SETUP_RESET   0x10

◆ AD469x_SEQ_CHANNEL_DI

#define AD469x_SEQ_CHANNEL_DI   0

◆ AD469x_SEQ_CHANNEL_EN

#define AD469x_SEQ_CHANNEL_EN   1

◆ AD469x_SEQ_CHANNELS_RESET

#define AD469x_SEQ_CHANNELS_RESET   0x00

◆ AD469x_SEQ_LB_CONFIG

#define AD469x_SEQ_LB_CONFIG (   x)    ( x & NO_OS_GENMASK(7,0))

◆ AD469x_SEQ_UB_CONFIG

#define AD469x_SEQ_UB_CONFIG (   x)    ( x >> 8)

◆ AD469x_SINGLE_CHANNEL_EN

#define AD469x_SINGLE_CHANNEL_EN (   x)    AD469x_CHANNEL(x)

◆ AD469x_TEMPERATURE_MSK

#define AD469x_TEMPERATURE_MSK   NO_OS_GENMASK(0,0)

◆ NUM_OF_REGISTERS

#define NUM_OF_REGISTERS   0x17F

Enumeration Type Documentation

◆ ad469x_polarity_select

Channel polarity modes.

Enumerator
AD469x_UNIPOLAR_MODE 
AD469x_PSEUDO_BIPOLAR_MODE 

Function Documentation

◆ ad469x_polarity_mode_select()

int32_t ad469x_polarity_mode_select ( struct ad469x_dev *  device,
enum ad469x_polarity_select  polarity_sel 
)

Select between polarity modes.

Parameters
device[in]- device instance
polarity_sel[in]- polarity selection.
Returns
0 in case of success, negative error code otherwise.

◆ ad469x_read_single_sample()

int32_t ad469x_read_single_sample ( struct ad469x_dev *  device,
uint8_t  chn_num,
uint32_t *  data 
)

Read single sample from the ADC.

Parameters
device[in]- device instance.
chn_num[in]- channel number to be selected.
data[out]- pointer to the adc data variable.
Returns
0 in case of success, negative error code otherwise.

◆ ad469x_reference_config()

int32_t ad469x_reference_config ( struct ad469x_dev *  device)

Configures the reference voltage setting.

Parameters
device[in]- device instance
Returns
0 in case of success, negative error code otherwise.

◆ ad469x_trigger_conversion()

int32_t ad469x_trigger_conversion ( struct ad469x_dev *  device)

Toggles conversion pin to trigger a new conversion.

Parameters
device[in]- device instance.
Returns
0 in case of success, negative error code otherwise.
Here is the caller graph for this function: