no-OS
Loading...
Searching...
No Matches
iio_ad405x.h
Go to the documentation of this file.
1/*******************************************************************************
2 * @file iio_ad405x.h
3 * @brief Header file of IIO AD405X Driver.
4 * @author George Mois (george.mois@analog.com)
5********************************************************************************
6 * Copyright 2025(c) Analog Devices, Inc.
7 *
8 * All rights reserved.
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions are met:
12 * - Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * - Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in
16 * the documentation and/or other materials provided with the
17 * distribution.
18 * - Neither the name of Analog Devices, Inc. nor the names of its
19 * contributors may be used to endorse or promote products derived
20 * from this software without specific prior written permission.
21 * - The use of this software may or may not infringe the patent rights
22 * of one or more patent holders. This license does not release you
23 * from the requirement that you obtain separate licenses from these
24 * patent holders to use this software.
25 * - Use of the software either in source or binary form, must be run
26 * on or directly connected to an Analog Devices Inc. component.
27 *
28 * THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR
29 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
30 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
31 * IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT,
32 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
33 * LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR
34 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
35 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
36 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38*******************************************************************************/
39#ifndef IIO_AD405X_H
40#define IIO_AD405X_H
41
42#include "iio.h"
43
52
65
73
75int ad405x_iio_read_debug_attrs(void *dev, char *buf, uint32_t len,
76 const struct iio_ch_info *channel, intptr_t priv);
78int ad405x_iio_write_debug_attrs(void *dev, char *buf, uint32_t len,
79 const struct iio_ch_info *channel, intptr_t priv);
81int ad405x_iio_write_sample_rate(void *dev, char *buf,
82 uint32_t len, const struct iio_ch_info *channel, intptr_t priv);
84int ad405x_iio_read_sample_rate(void *dev, char *buf, uint32_t len,
85 const struct iio_ch_info *channel, intptr_t priv);
87int ad405x_iio_write_avg_filter_length(void *dev, char *buf,
88 uint32_t len, const struct iio_ch_info *channel, intptr_t priv);
90int ad405x_iio_read_avg_filter_length(void *dev, char *buf, uint32_t len,
91 const struct iio_ch_info *channel, intptr_t priv);
93int ad405x_iio_init(struct ad405x_iio_dev **iio_dev,
96int ad405x_iio_remove(struct ad405x_iio_dev *desc);
97
98#endif
struct ad7616_init_param init_param
Definition ad7616_sdz.c:107
Header file of iio.
int ad405x_iio_init(struct ad405x_iio_dev **iio_dev, struct ad405x_iio_dev_init_param *init_param)
Initializes the AD405X IIO driver.
Definition iio_ad405x.c:411
@ AD405X_DEBUG_AVG_FILTER_LEN
Definition iio_ad405x.h:50
@ AD405X_DEBUG_SAMPLE_RATE
Definition iio_ad405x.h:49
int ad405x_iio_write_avg_filter_length(void *dev, char *buf, uint32_t len, const struct iio_ch_info *channel, intptr_t priv)
Handles the write request for average filter length attribute.
Definition iio_ad405x.c:341
int ad405x_iio_read_sample_rate(void *dev, char *buf, uint32_t len, const struct iio_ch_info *channel, intptr_t priv)
Handles the read request for sample rate attribute.
Definition iio_ad405x.c:306
int ad405x_iio_read_avg_filter_length(void *dev, char *buf, uint32_t len, const struct iio_ch_info *channel, intptr_t priv)
Handles the read request for average filter length attribute.
Definition iio_ad405x.c:379
int ad405x_iio_read_debug_attrs(void *dev, char *buf, uint32_t len, const struct iio_ch_info *channel, intptr_t priv)
Handles the read request for debug attributes.
Definition iio_ad405x.c:176
int ad405x_iio_write_debug_attrs(void *dev, char *buf, uint32_t len, const struct iio_ch_info *channel, intptr_t priv)
Handles the write request for debug attributes.
Definition iio_ad405x.c:220
int ad405x_iio_remove(struct ad405x_iio_dev *desc)
Free the resources allocated by ad405x_iio_init().
Definition iio_ad405x.c:456
int ad405x_iio_write_sample_rate(void *dev, char *buf, uint32_t len, const struct iio_ch_info *channel, intptr_t priv)
Handles the write request for sampling rate attribute.
Definition iio_ad405x.c:268
ADIS IIO debug attributes enumeration.
Definition iio_ad405x.h:70
struct ad405x_init_param * ad405x_dev_init
Definition iio_ad405x.h:71
AD405X IIO device structure.
Definition iio_ad405x.h:57
struct ad405x_dev * ad405x_dev
Definition iio_ad405x.h:59
struct iio_device * iio_dev
Definition iio_ad405x.h:61
uint32_t active_channels
Definition iio_ad405x.h:62
uint8_t no_of_active_channels
Definition iio_ad405x.h:63
Structure holding the parameters for AD405X device initialization.
Definition ad405x.h:183
Structure holding channel attributess.
Definition iio_types.h:94
Structure holding channels and attributes of a device.
Definition iio_types.h:238