no-OS
Classes | Macros | Enumerations | Functions
iio_ad3552r.c File Reference

IIO implementation for ad3552r Driver. More...

#include <stdio.h>
#include "iio_types.h"
#include "iio.h"
#include "ad3552r.h"
#include "no_os_error.h"
#include "no_os_util.h"
#include "no_os_alloc.h"
Include dependency graph for iio_ad3552r.c:

Classes

struct  iio_ad3552r_desc
 

Macros

#define AD3552R_ATTR(_name, _priv)
 
#define AD3552R_DAC_CH(_idx)
 

Enumerations

enum  ad3552r_iio_attrs {
  AD3552R_IIO_ATTR_EN,
  AD3552R_IIO_ATTR_OFFSET,
  AD3552R_IIO_ATTR_RAW,
  AD3552R_IIO_ATTR_SCALE
}
 

Functions

int32_t iio_ad3552r_init (struct iio_ad3552r_desc **iio_dac, struct ad3552r_init_param *param)
 
int32_t iio_ad3552r_remove (struct iio_ad3552r_desc *iio_dac)
 
void iio_ad3552r_get_descriptor (struct iio_ad3552r_desc *iio_dac, struct iio_device **desc)
 

Detailed Description

IIO implementation for ad3552r Driver.

Author
Mihail Chindris (Mihai.nosp@m.l.Ch.nosp@m.indri.nosp@m.s@an.nosp@m.alog..nosp@m.com)

Copyright 2021(c) Analog Devices, Inc.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of Analog Devices, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Macro Definition Documentation

◆ AD3552R_ATTR

#define AD3552R_ATTR (   _name,
  _priv 
)
Value:
{\
.name = _name,\
.priv = _priv,\
.show = iio_ad3552r_attr_get,\
.store = iio_ad3552r_attr_set\
}

◆ AD3552R_DAC_CH

#define AD3552R_DAC_CH (   _idx)
Value:
(struct iio_channel){\
.ch_type = IIO_VOLTAGE,\
.ch_out = 1,\
.indexed = true,\
.channel = _idx,\
.scan_index = _idx,\
.scan_type = &ad3552r_dac_scan_type,\
.attributes = iio_ad3552r_ch_attributes}

Enumeration Type Documentation

◆ ad3552r_iio_attrs

Enumerator
AD3552R_IIO_ATTR_EN 
AD3552R_IIO_ATTR_OFFSET 
AD3552R_IIO_ATTR_RAW 
AD3552R_IIO_ATTR_SCALE 

Function Documentation

◆ iio_ad3552r_get_descriptor()

void iio_ad3552r_get_descriptor ( struct iio_ad3552r_desc iio_dac,
struct iio_device **  desc 
)

◆ iio_ad3552r_init()

int32_t iio_ad3552r_init ( struct iio_ad3552r_desc **  iio_dac,
struct ad3552r_init_param param 
)

◆ iio_ad3552r_remove()

int32_t iio_ad3552r_remove ( struct iio_ad3552r_desc iio_dac)
iio_channel
Struct describing the scan type.
Definition: iio_types.h:168
IIO_VOLTAGE
@ IIO_VOLTAGE
Definition: iio_types.h:65