no-OS
Loading...
Searching...
No Matches
iio_adis16607.c File Reference

Implementation of iio_adis16607.c. More...

#include "iio_adis16607.h"
#include "iio_types.h"
#include "iio_trigger.h"
#include "no_os_alloc.h"
#include "no_os_delay.h"
#include "no_os_irq.h"
#include "no_os_units.h"
Include dependency graph for iio_adis16607.c:

Macros

#define ADIS16607_FIFO_WORD_CNT_REG   0x2B
 
#define ADIS16607_FULL_FIFO_VAL   988
 
#define ADIS16607_MSW_MASK   NO_OS_GENMASK(31, 16)
 
#define ADIS16607_LSW_MASK   NO_OS_GENMASK(15, 0)
 
#define ADIS16607_FIFO_THR_MET   NO_OS_BIT(0)
 

Functions

int adis16607_iio_init (struct adis_iio_dev **iio_dev, struct adis_init_param *init_param, struct iio_hw_trig *adis16607_trig_desc)
 Initialize adis16607 iio device.
 
void adis16607_iio_remove (struct adis_iio_dev *desc)
 Remove adis16607 iio device.
 

Variables

struct iio_attribute adis16607_iio_temp_attrs []
 
struct iio_attribute adis16607_debug_attrs []
 

Detailed Description

Implementation of iio_adis16607.c.

Author
Radu Sabau (radu..nosp@m.saba.nosp@m.u@ana.nosp@m.log..nosp@m.com)

Copyright 2026(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

◆ ADIS16607_FIFO_THR_MET

#define ADIS16607_FIFO_THR_MET   NO_OS_BIT(0)

◆ ADIS16607_FIFO_WORD_CNT_REG

#define ADIS16607_FIFO_WORD_CNT_REG   0x2B

◆ ADIS16607_FULL_FIFO_VAL

#define ADIS16607_FULL_FIFO_VAL   988

◆ ADIS16607_LSW_MASK

#define ADIS16607_LSW_MASK   NO_OS_GENMASK(15, 0)

◆ ADIS16607_MSW_MASK

#define ADIS16607_MSW_MASK   NO_OS_GENMASK(31, 16)

Function Documentation

◆ adis16607_iio_init()

int adis16607_iio_init ( struct adis_iio_dev ** iio_dev,
struct adis_init_param * init_param,
struct iio_hw_trig * adis16607_trig_desc )

Initialize adis16607 iio device.

Parameters
iio_dev- The adis16607 iio device.
init_param- The structure that contains the device initial parameters.
adis16607_trig_desc- Trigger descriptor for data ready pin.
Returns
0 in case of success, error code otherwise.

◆ adis16607_iio_remove()

void adis16607_iio_remove ( struct adis_iio_dev * desc)

Remove adis16607 iio device.

Parameters
desc- The adis16607 iio device.

Variable Documentation

◆ adis16607_debug_attrs

struct iio_attribute adis16607_debug_attrs[]

◆ adis16607_iio_temp_attrs

struct iio_attribute adis16607_iio_temp_attrs[]
Initial value:
= {
{
.name = "raw",
},
{
.name = "scale",
},
{
.name = "offset",
},
}
int adis_iio_read_scale(void *dev, char *buf, uint32_t len, const struct iio_ch_info *channel, intptr_t priv)
Handles the read request for scale attribute.
Definition iio_adis.c:140
int adis_iio_read_raw(void *dev, char *buf, uint32_t len, const struct iio_ch_info *channel, intptr_t priv)
Handles the read request for raw attribute.
Definition iio_adis.c:63
int adis_iio_read_offset(void *dev, char *buf, uint32_t len, const struct iio_ch_info *channel, intptr_t priv)
Handles the read request for offset attribute.
Definition iio_adis.c:212
#define END_ATTRIBUTES_ARRAY
Definition iio_types.h:85