no-OS
Macros | Variables
iio_adpd410x.c File Reference

Implementation of adpd410x iio. More...

#include "iio_types.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "adpd410x.h"
#include "no-os/util.h"
#include "no-os/error.h"
Include dependency graph for iio_adpd410x.c:

Macros

#define ADPD410X_IIO_NUM_CH   8
 
#define ADPD410X_IIO_CHANN_DEF(nm, ch)
 

Variables

struct iio_device const adpd410x_iio_descriptor
 

Detailed Description

Implementation of adpd410x iio.

Author
Antoniu Miclaus (anton.nosp@m.iu.m.nosp@m.iclau.nosp@m.s@an.nosp@m.alog..nosp@m.com)

Copyright 2021(c) Analog Devices, Inc.

All rights reserved.

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

THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, 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

◆ ADPD410X_IIO_CHANN_DEF

#define ADPD410X_IIO_CHANN_DEF (   nm,
  ch 
)
Value:
{ \
.name = nm, \
.ch_type = IIO_VOLTAGE, \
.channel = ch, \
.scan_type = &channel_scan_type, \
.scan_index = ch, \
.attributes = adpd410x_iio_channel_attributes, \
.ch_out = false, \
.indexed = 1, \
.diferential = false, \
}

◆ ADPD410X_IIO_NUM_CH

#define ADPD410X_IIO_NUM_CH   8

Variable Documentation

◆ adpd410x_iio_descriptor

struct iio_device const adpd410x_iio_descriptor
Initial value:
= {
.channels = adpd410x_iio_channels,
.attributes = adpd410x_iio_attributes,
.read_dev = (int32_t (*)())adpd410x_read_samples,
.debug_reg_read = (int32_t (*)())adpd410x_reg_read,
.debug_reg_write = (int32_t (*)())adpd410x_reg_write,
}

IIO Descriptor

IIO_VOLTAGE
@ IIO_VOLTAGE
Definition: iio_types.h:71
iio_channel::attributes
struct iio_attribute * attributes
Definition: iio_types.h:177
adpd410x_reg_read
int32_t adpd410x_reg_read(struct adpd410x_dev *dev, uint16_t address, uint16_t *data)
Read device register.
Definition: adpd410x.c:61
ADPD410X_IIO_NUM_CH
#define ADPD410X_IIO_NUM_CH
Definition: iio_adpd410x.c:56
adpd410x_reg_write
int32_t adpd410x_reg_write(struct adpd410x_dev *dev, uint16_t address, uint16_t data)
Write device register.
Definition: adpd410x.c:143