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

AD469x device No-OS driver supports. More...

#include <stdint.h>
#include "app_config.h"
#include "ad469x_support.h"
#include "ad469x_user_config.h"
#include "no_os_error.h"
#include "no_os_gpio.h"
#include "no_os_spi.h"
Include dependency graph for ad469x_support.c:

Macros

#define DATA_READY_TIMEOUT   0xffffffff
 

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

AD469x device 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

◆ DATA_READY_TIMEOUT

#define DATA_READY_TIMEOUT   0xffffffff

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: