precision-converters-firmware
Loading...
Searching...
No Matches
Functions
ad552xr_support.h File Reference

Header file for the AD552XR IIO Application Support. More...

#include <stdint.h>
#include "iio.h"
Include dependency graph for ad552xr_support.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int32_t ad552xr_set_sampling_rate (uint32_t val)
 Set the sampling rate.
 
int32_t ad552xr_get_sampling_rate (uint32_t *val)
 Get the sampling rate.
 
int32_t ad552xr_data_transfer_system_init ()
 Initialize the Data Transfer System.
 
int32_t ad552xr_data_transfer_prepare (void *dev, uint32_t mask)
 Prepares the device for data transfer.
 
int32_t ad552xr_data_transfer_start (struct iio_device_data *iio_dev_data, uint8_t *dst_data_buffer)
 Start the device data transfer for SPI interrupt interface mode.
 
int32_t ad552xr_data_transfer_stop (void *dev)
 Stop the device data transfer.
 
int32_t ad552xr_data_transfer_system_remove ()
 De-initialize the Data Transfer System.
 

Detailed Description

Header file for the AD552XR IIO Application Support.

Copyright (c) 2026 Analog Devices, Inc.

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.

Function Documentation

◆ ad552xr_data_transfer_prepare()

int32_t ad552xr_data_transfer_prepare ( void *  dev,
uint32_t  mask 
)

Prepares the device for data transfer.

Parameters
dev[in,out]-Application descriptor.
mask[in]-Channels select mask.
Returns
0 in case of success, error code otherwise.

◆ ad552xr_data_transfer_start()

int32_t ad552xr_data_transfer_start ( struct iio_device_data *  iio_dev_data,
uint8_t *  dst_data_buffer 
)

Start the device data transfer for SPI interrupt interface mode.

This function will be called from IIO Trigger ISR. In the first call, it will populate the data buffer with valid data and LDAC commands. Then it will enable TGP timer to trigger HW LDAC if necessary. The SPI data frames will be transferred for every function call. In the end of the LDAC cycle, if SW LDAC is configured for any channel, it will be triggered in the end of SPI transfer. This cycle will be repeated until the stop function is called.

Parameters
iio_dev_data[in]- IIO device data instance.
dst_data_buffer[in,out]- Destination data buffer to populate the data.
Returns
0 in case of success, negative error code otherwise

◆ ad552xr_data_transfer_stop()

int32_t ad552xr_data_transfer_stop ( void *  dev)

Stop the device data transfer.

Parameters
dev[in,out]-Application descriptor.
Returns
0 in case of success, error code otherwise.

◆ ad552xr_data_transfer_system_init()

int32_t ad552xr_data_transfer_system_init ( void  )

Initialize the Data Transfer System.

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

◆ ad552xr_data_transfer_system_remove()

int32_t ad552xr_data_transfer_system_remove ( void  )

De-initialize the Data Transfer System.

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

◆ ad552xr_get_sampling_rate()

int32_t ad552xr_get_sampling_rate ( uint32_t *  val)

Get the sampling rate.

Parameters
val[out]- Sample rate value.
Returns
0 in case of success, negative error code otherwise.

◆ ad552xr_set_sampling_rate()

int32_t ad552xr_set_sampling_rate ( uint32_t  val)

Set the sampling rate.

Parameters
val[in]- Sample rate value.
Returns
0 in case of success, negative error code otherwise.