precision-converters-firmware
Macros | Enumerations | Functions | Variables
ad355xr_iio.c File Reference

AD355XR IIO application interface module. More...

#include "app_config.h"
#include "ad355xr_iio.h"
#include "ad355xr_regs.h"
#include "ad355xr_user_config.h"
#include "ad355xr_support.h"
#include "no_os_error.h"
#include "no_os_util.h"
#include "no_os_gpio.h"
#include "iio_trigger.h"
Include dependency graph for ad355xr_iio.c:

Macros

#define AD355XR_CHN_ATTR(_name, _priv)
 
#define AD355XR_CHN_AVAIL_ATTR(_name, _priv)
 
#define AD355XR_CH(_name, _idx, _type)
 
#define NUM_OF_IIO_DEVICES   1
 
#define AD355XR_IIO_TRIGGER_NAME   "ad355xr_iio_trigger"
 
#define BYTES_PER_SAMPLE   sizeof(uint16_t)
 
#define CHN_STORAGE_BITS   (BYTES_PER_SAMPLE * 8)
 
#define DATA_BUFFER_SIZE   (32768)
 

Enumerations

enum  ad355xr_attribute_id {
  DAC_RAW ,
  DAC_SCALE ,
  DAC_OFFSET ,
  DAC_CH_ENABLE ,
  DAC_CH_OUTPUT_RANGE ,
  DAC_CH_MODE ,
  DAC_VREF_VOLTAGE ,
  DAC_SIMULTANEOUS_UPDATE ,
  DAC_SAMPLING_FREQUENCY
}
 

Functions

int32_t ad355xr_iio_initialize (void)
 Initialize the IIO interface for AD355XR IIO device. More...
 
void ad355xr_iio_event_handler (void)
 Run the AD355XR IIO event handler. More...
 

Variables

struct ad3552r_desc * ad355xr_dev_inst = NULL
 

Detailed Description

AD355XR IIO application interface module.

Copyright (c) 2023-2024 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

◆ AD355XR_CH

#define AD355XR_CH (   _name,
  _idx,
  _type 
)
Value:
{\
.name = _name, \
.ch_type = _type,\
.ch_out = true,\
.indexed = true,\
.channel = _idx,\
.scan_index = _idx,\
.scan_type = &ad355xr_iio_scan_type,\
.attributes = ad355xr_iio_ch_attributes\
}

◆ AD355XR_CHN_ATTR

#define AD355XR_CHN_ATTR (   _name,
  _priv 
)
Value:
{\
.name = _name,\
.priv = _priv,\
.show = ad355xr_iio_attr_get,\
.store = ad355xr_iio_attr_set\
}

◆ AD355XR_CHN_AVAIL_ATTR

#define AD355XR_CHN_AVAIL_ATTR (   _name,
  _priv 
)
Value:
{\
.name = _name,\
.priv = _priv,\
.show = ad355xr_iio_attr_available_get,\
.store = ad355xr_iio_attr_available_set\
}

◆ AD355XR_IIO_TRIGGER_NAME

#define AD355XR_IIO_TRIGGER_NAME   "ad355xr_iio_trigger"

◆ BYTES_PER_SAMPLE

#define BYTES_PER_SAMPLE   sizeof(uint16_t)

◆ CHN_STORAGE_BITS

#define CHN_STORAGE_BITS   (BYTES_PER_SAMPLE * 8)

◆ DATA_BUFFER_SIZE

#define DATA_BUFFER_SIZE   (32768)

◆ NUM_OF_IIO_DEVICES

#define NUM_OF_IIO_DEVICES   1

Enumeration Type Documentation

◆ ad355xr_attribute_id

Enumerator
DAC_RAW 
DAC_SCALE 
DAC_OFFSET 
DAC_CH_ENABLE 
DAC_CH_OUTPUT_RANGE 
DAC_CH_MODE 
DAC_VREF_VOLTAGE 
DAC_SIMULTANEOUS_UPDATE 
DAC_SAMPLING_FREQUENCY 

Function Documentation

◆ ad355xr_iio_event_handler()

void ad355xr_iio_event_handler ( void  )

Run the AD355XR IIO event handler.

Returns
none

This function monitors the new IIO client event

Here is the caller graph for this function:

◆ ad355xr_iio_initialize()

int32_t ad355xr_iio_initialize ( void  )

Initialize the IIO interface for AD355XR IIO device.

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

Variable Documentation

◆ ad355xr_dev_inst

struct ad3552r_desc* ad355xr_dev_inst = NULL