no-OS
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
iio_ad7606.c File Reference

Implementation of AD7606 IIO interface. More...

#include <stdio.h>
#include <math.h>
#include "ad7606.h"
#include "iio_ad7606.h"
#include "iio.h"
#include "no_os_util.h"
#include "no_os_alloc.h"
#include "no_os_error.h"
Include dependency graph for iio_ad7606.c:

Macros

#define AD7606_CH(_idx, bits)
 
#define AD7606_CHN_ATTR(_name, _priv)
 
#define MAX_CHANNELS   8
 

Enumerations

enum  ad7606_iio_attributes_id {
  OSR_ATTR_ID ,
  OSR_AVAILABLE_ID
}
 

Functions

int ad7606_iio_init (struct ad7606_iio_dev **dev, struct ad7606_init_param *init_param)
 Initialize AD7606 for IIO interfacing.
 
int ad7606_iio_remove (struct ad7606_iio_dev *dev)
 

Detailed Description

Implementation of AD7606 IIO interface.

Copyright (c) 2024 Analog Devices, Inc. Copyright (c) 2024 BayLibre, SAS. 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

◆ AD7606_CH

#define AD7606_CH ( _idx,
bits )
Value:
{\
.name = "voltage" #_idx, \
.ch_type = IIO_VOLTAGE,\
.ch_out = IIO_DIRECTION_INPUT,\
.indexed = true,\
.channel = _idx,\
.scan_index = _idx,\
.scan_type = &ad7606_iio_scan_type_ ## bits ## bit,\
.attributes = ad7606_iio_ch_attributes,\
}
@ IIO_VOLTAGE
Definition iio_types.h:56
@ IIO_DIRECTION_INPUT
Definition iio_types.h:191

◆ AD7606_CHN_ATTR

#define AD7606_CHN_ATTR ( _name,
_priv )
Value:
{\
.name = _name,\
.priv = _priv,\
.show = iio_ad7606_attr_get,\
.store = iio_ad7606_attr_set,\
}

◆ MAX_CHANNELS

#define MAX_CHANNELS   8

Enumeration Type Documentation

◆ ad7606_iio_attributes_id

Enumerator
OSR_ATTR_ID 
OSR_AVAILABLE_ID 

Function Documentation

◆ ad7606_iio_init()

int ad7606_iio_init ( struct ad7606_iio_dev ** dev,
struct ad7606_init_param * init_param )

Initialize AD7606 for IIO interfacing.

Parameters
dev- The device structure.
init_param- The initialization parameters for the AD7606x device.
Returns
0 on success, an error code otherwise
Here is the caller graph for this function:

◆ ad7606_iio_remove()

int ad7606_iio_remove ( struct ad7606_iio_dev * dev)
Here is the caller graph for this function: