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

AD7768-1 No-OS driver support file. More...

#include <string.h>
#include <stdlib.h>
#include "app_config.h"
#include "ad77681_iio.h"
#include "ad77681_support.h"
#include "no_os_error.h"
Include dependency graph for ad77681_support.c:

Macros

#define AD77681_SAMPLE_DATA_BUFF_LEN   6
 
#define AD77681_24_BITS_SIGN_EXTENSION   0xFFFFFF
 
#define AD77681_2_BYTES_SHIFT   16
 
#define AD77681_1_BYTE_SHIFT   8
 

Functions

int32_t ad77681_enable_cont_conv_mode (void)
 Enable continuous conversion mode. More...
 
int32_t ad77681_read_converted_sample (uint32_t *adc_raw)
 Read ADC raw data for recently sampled channel. More...
 
int32_t ad77681_read_single_sample (uint32_t *adc_raw)
 Read ADC single sample data. More...
 

Detailed Description

AD7768-1 No-OS driver support file.

AD7768-1 No-OS driver support header file.

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

◆ AD77681_1_BYTE_SHIFT

#define AD77681_1_BYTE_SHIFT   8

◆ AD77681_24_BITS_SIGN_EXTENSION

#define AD77681_24_BITS_SIGN_EXTENSION   0xFFFFFF

◆ AD77681_2_BYTES_SHIFT

#define AD77681_2_BYTES_SHIFT   16

◆ AD77681_SAMPLE_DATA_BUFF_LEN

#define AD77681_SAMPLE_DATA_BUFF_LEN   6

Function Documentation

◆ ad77681_enable_cont_conv_mode()

int32_t ad77681_enable_cont_conv_mode ( void  )

Enable continuous conversion mode.

Returns
0 in case of success or negative value otherwise

◆ ad77681_read_converted_sample()

int32_t ad77681_read_converted_sample ( uint32_t *  adc_raw)

Read ADC raw data for recently sampled channel.

Parameters
adc_raw[in,out]- Pointer to adc data read variable
Returns
0 in case of success or negative value otherwise
Here is the caller graph for this function:

◆ ad77681_read_single_sample()

int32_t ad77681_read_single_sample ( uint32_t *  adc_raw)

Read ADC single sample data.

Parameters
adc_raw[out]- Pointer to adc data read variable
Returns
0 in case of success or negative value otherwise
Here is the caller graph for this function: