no-OS
Classes | Macros | Enumerations | Functions | Variables
iio_adis_internals.h File Reference

Internal include file used for specific chip IIO driver definitions which are not useful for the user. More...

#include "iio.h"
#include <errno.h>
Include dependency graph for iio_adis_internals.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  adis_iio_scale_fractional
 ADIS IIO fractional scale format structure; scale = dividend/divisor. More...
 
struct  adis_iio_scale_fractional_log2
 ADIS IIO fractional log2 scale format structure; scale = dividend/2^power. More...
 
struct  adis_iio_dev
 ADIS IIO device descriptor structure. More...
 

Macros

#define ADIS_ACCEL_CHAN(mod, idx, adis_nb, attr)
 
#define ADIS_GYRO_CHAN(mod, idx, adis_nb, attr)
 
#define ADIS_DELTA_ANGL_CHAN(mod, idx, adis_nb, attr)
 
#define ADIS_DELTA_ANGL_CHAN_NO_SCAN(mod, idx, attr)
 
#define ADIS_DELTA_VEL_CHAN(mod, idx, adis_nb, attr)
 
#define ADIS_DELTA_VEL_CHAN_NO_SCAN(mod, idx, attr)
 
#define ADIS_TEMP_CHAN(idx, adis_nb, attr)
 

Enumerations

enum  adis_iio_chan_type {
  ADIS_GYRO_X,
  ADIS_GYRO_Y,
  ADIS_GYRO_Z,
  ADIS_ACCEL_X,
  ADIS_ACCEL_Y,
  ADIS_ACCEL_Z,
  ADIS_TEMP,
  ADIS_DELTA_ANGL_X,
  ADIS_DELTA_ANGL_Y,
  ADIS_DELTA_ANGL_Z,
  ADIS_DELTA_VEL_X,
  ADIS_DELTA_VEL_Y,
  ADIS_DELTA_VEL_Z,
  ADIS_NUM_CHAN
}
 
enum  adis_iio_debug_attrs {
  ADIS_DIAG_SNSR_INIT_FAILURE,
  ADIS_DIAG_DATA_PATH_OVERRUN,
  ADIS_DIAG_FLS_MEM_UPDATE_FAILURE,
  ADIS_DIAG_SPI_COMM_ERR,
  ADIS_DIAG_STANDBY_MODE,
  ADIS_DIAG_SNSR_FAILURE,
  ADIS_DIAG_MEM_FAILURE,
  ADIS_DIAG_CLK_ERR,
  ADIS_DIAG_GYRO1_FAILURE,
  ADIS_DIAG_GYRO2_FAILURE,
  ADIS_DIAG_ACCL_FAILURE,
  ADIS_DIAG_X_AXIS_GYRO_FAILURE,
  ADIS_DIAG_Y_AXIS_GYRO_FAILURE,
  ADIS_DIAG_Z_AXIS_GYRO_FAILURE,
  ADIS_DIAG_X_AXIS_ACCL_FAILURE,
  ADIS_DIAG_Y_AXIS_ACCL_FAILURE,
  ADIS_DIAG_Z_AXIS_ACCL_FAILURE,
  ADIS_DIAG_ADUC_MCU_FAULT,
  ADIS_DIAG_CONFIG_CALIB_CRC_ERR,
  ADIS_DIAG_OVERRANGE,
  ADIS_DIAG_TEMP_ERR,
  ADIS_DIAG_POWER_SUPPLY_FAILURE,
  ADIS_DIAG_BOOT_MEMORY_FAILURE,
  ADIS_DIAG_REG_NVM_ERR,
  ADIS_DIAG_WDG_TIMER_FLAG,
  ADIS_DIAG_INT_PROC_SUPPLY_ERR,
  ADIS_DIAG_EXT_5V_SUPPLY_ERR,
  ADIS_DIAG_INT_SNSR_SUPPLY_ERR,
  ADIS_DIAG_INT_REG_ERR,
  ADIS_DIAG_CHECKSUM_ERR,
  ADIS_DIAG_FLS_MEM_WR_CNT_EXCEED,
  ADIS_DIAG_LOST_SAMPLES_COUNT,
  ADIS_TIME_STAMP,
  ADIS_DATA_CNTR,
  ADIS_FIFO_CNT,
  ADIS_SPI_CHKSUM,
  ADIS_FIFO_EN,
  ADIS_FIFO_OVERFLOW,
  ADIS_FIFO_WM_INT_EN,
  ADIS_FIFO_WM_INT_POL,
  ADIS_FIFO_WM_LVL,
  ADIS_FILT_SIZE_VAR_B,
  ADIS_GYRO_MEAS_RANGE,
  ADIS_DR_ENABLE,
  ADIS_DR_POLARITY,
  ADIS_DR_LINE_SEL,
  ADIS_SYNC_POLARITY,
  ADIS_SYNC_LINE_SEL,
  ADIS_SYNC_MODE,
  ADIS_ALARM_IND_ENABLE,
  ADIS_ALARM_IND_POLARITY,
  ADIS_ALARM_IND_L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ADIS_USR_SCR_1,
  ADIS_USR_SCR_2,
  ADIS_USR_SCR_3,
  ADIS_USR_SCR_4,
  ADIS_FLS_MEM_WR_CNTR,
  ADIS_EXT_CLK_FREQ
}
 

Functions

int adis_iio_pre_enable (void *dev, uint32_t mask)
 API to be called before trigger is enabled. More...
 
int adis_iio_post_disable (void *dev, uint32_t mask)
 API to be called after trigger is disabled. More...
 
int adis_iio_read_samples (void *dev, int *buff, uint32_t samples)
 
int adis_iio_trigger_handler (struct iio_device_data *dev_data)
 Handles trigger: reads one data-set and writes it to the buffer. More...
 
int adis_iio_trigger_handler_with_fifo (struct iio_device_data *dev_data)
 Handles trigger: reads all available samples in FIFO and writes them to the buffer. More...
 
int adis_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. More...
 
int adis_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. More...
 
int adis_iio_read_reg (struct adis_iio_dev *device, uint32_t reg, uint32_t *readval)
 Wrapper for reading adis register. More...
 
int adis_iio_write_reg (struct adis_iio_dev *device, uint32_t reg, uint32_t writeval)
 Wrapper for writing to adis register. More...
 
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. More...
 
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. More...
 
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. More...
 
int adis_iio_read_calibbias (void *dev, char *buf, uint32_t len, const struct iio_ch_info *channel, intptr_t priv)
 Handles the read request for calibbias attribute. More...
 
int adis_iio_write_calibbias (void *dev, char *buf, uint32_t len, const struct iio_ch_info *channel, intptr_t priv)
 Handles the write request for calibbias attribute. More...
 
int adis_iio_read_calibscale (void *dev, char *buf, uint32_t len, const struct iio_ch_info *channel, intptr_t priv)
 Handles the read request for calibscale attribute. More...
 
int adis_iio_write_calibscale (void *dev, char *buf, uint32_t len, const struct iio_ch_info *channel, intptr_t priv)
 Handles the write request for calibscale attribute. More...
 
int adis_iio_write_sampling_freq (void *dev, char *buf, uint32_t len, const struct iio_ch_info *channel, intptr_t priv)
 Handles the write request for sampling frequency attribute. More...
 
int adis_iio_read_sampling_freq (void *dev, char *buf, uint32_t len, const struct iio_ch_info *channel, intptr_t priv)
 Handles the read request for sampling frequency attribute. More...
 
int adis_iio_read_lpf (void *dev, char *buf, uint32_t len, const struct iio_ch_info *channel, intptr_t priv)
 Handles the read request for lpf attribute. More...
 
int adis_iio_write_lpf (void *dev, char *buf, uint32_t len, const struct iio_ch_info *channel, intptr_t priv)
 Handles the write request for lpf attribute. More...
 

Variables

struct iio_attribute adis_dev_attrs []
 
struct iio_attribute adis_iio_anglvel_attrs []
 
struct iio_attribute adis_iio_delta_angl_attrs []
 
struct iio_attribute adis_iio_delta_vel_attrs []
 
struct iio_attribute adis_iio_accel_attrs []
 
struct iio_attribute adis_iio_temp_attrs []
 
struct iio_trigger adis_iio_trig_desc
 

Detailed Description

Internal include file used for specific chip IIO driver definitions which are not useful for the user.

Author
RBolboac (ramon.nosp@m.a.gr.nosp@m.adina.nosp@m.riu@.nosp@m.analo.nosp@m.g.co.nosp@m.m)

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

◆ ADIS_ACCEL_CHAN

#define ADIS_ACCEL_CHAN (   mod,
  idx,
  adis_nb,
  attr 
)
Value:
{ \
.ch_type = IIO_ACCEL, \
.modified = true, \
.channel2 = IIO_MOD_##mod, \
.address = idx, \
.scan_index = idx, \
.scan_type = &adis##adis_nb##_iio_accel_scan_type, \
.attributes = attr, \
}

◆ ADIS_DELTA_ANGL_CHAN

#define ADIS_DELTA_ANGL_CHAN (   mod,
  idx,
  adis_nb,
  attr 
)
Value:
{ \
.ch_type = IIO_DELTA_ANGL, \
.modified = true, \
.channel2 = IIO_MOD_##mod, \
.address = idx, \
.scan_index = idx, \
.scan_type = &adis##adis_nb##_iio_delta_angl_scan_type, \
.attributes = attr, \
}

◆ ADIS_DELTA_ANGL_CHAN_NO_SCAN

#define ADIS_DELTA_ANGL_CHAN_NO_SCAN (   mod,
  idx,
  attr 
)
Value:
{ \
.ch_type = IIO_DELTA_ANGL, \
.modified = true, \
.channel2 = IIO_MOD_##mod, \
.address = idx, \
.attributes = attr, \
}

◆ ADIS_DELTA_VEL_CHAN

#define ADIS_DELTA_VEL_CHAN (   mod,
  idx,
  adis_nb,
  attr 
)
Value:
{ \
.ch_type = IIO_DELTA_VELOCITY, \
.modified = true, \
.channel2 = IIO_MOD_##mod, \
.address = idx, \
.scan_index = idx, \
.scan_type = &adis##adis_nb##_iio_delta_vel_scan_type, \
.attributes = attr, \
}

◆ ADIS_DELTA_VEL_CHAN_NO_SCAN

#define ADIS_DELTA_VEL_CHAN_NO_SCAN (   mod,
  idx,
  attr 
)
Value:
{ \
.ch_type = IIO_DELTA_VELOCITY, \
.modified = true, \
.channel2 = IIO_MOD_##mod, \
.address = idx, \
.attributes = attr, \
}

◆ ADIS_GYRO_CHAN

#define ADIS_GYRO_CHAN (   mod,
  idx,
  adis_nb,
  attr 
)
Value:
{ \
.ch_type = IIO_ANGL_VEL, \
.modified = true, \
.channel2 = IIO_MOD_##mod, \
.address = idx, \
.scan_index = idx, \
.scan_type = &adis##adis_nb##_iio_anglvel_scan_type, \
.attributes = attr, \
}

◆ ADIS_TEMP_CHAN

#define ADIS_TEMP_CHAN (   idx,
  adis_nb,
  attr 
)
Value:
{ \
.ch_type = IIO_TEMP, \
.channel = 0, \
.indexed = true, \
.address = idx, \
.scan_index = idx, \
.scan_type = &adis##adis_nb##_iio_temp_scan_type, \
.attributes = attr, \
}

Enumeration Type Documentation

◆ adis_iio_chan_type

Enumerator
ADIS_GYRO_X 
ADIS_GYRO_Y 
ADIS_GYRO_Z 
ADIS_ACCEL_X 
ADIS_ACCEL_Y 
ADIS_ACCEL_Z 
ADIS_TEMP 
ADIS_DELTA_ANGL_X 
ADIS_DELTA_ANGL_Y 
ADIS_DELTA_ANGL_Z 
ADIS_DELTA_VEL_X 
ADIS_DELTA_VEL_Y 
ADIS_DELTA_VEL_Z 
ADIS_NUM_CHAN 

◆ adis_iio_debug_attrs

Enumerator
ADIS_DIAG_SNSR_INIT_FAILURE 
ADIS_DIAG_DATA_PATH_OVERRUN 
ADIS_DIAG_FLS_MEM_UPDATE_FAILURE 
ADIS_DIAG_SPI_COMM_ERR 
ADIS_DIAG_STANDBY_MODE 
ADIS_DIAG_SNSR_FAILURE 
ADIS_DIA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LS_MEM_WR_CNTR 
ADIS_EXT_CLK_FREQ 

Function Documentation

◆ adis_iio_post_disable()

int adis_iio_post_disable ( void *  dev,
uint32_t  mask 
)

API to be called after trigger is disabled.

API to be called before trigger is disabled.

Parameters
dev- The iio device structure.
mask- The active channels mask.
Returns
0 in case of success, error code otherwise.

◆ adis_iio_pre_enable()

int adis_iio_pre_enable ( void *  dev,
uint32_t  mask 
)

API to be called before trigger is enabled.

API to be called before trigger is enabled.

Parameters
dev- The iio device structure.
mask- The active channels mask.
Returns
0 in case of success, error code otherwise.

◆ adis_iio_read_calibbias()

int adis_iio_read_calibbias ( void *  dev,
char *  buf,
uint32_t  len,
const struct iio_ch_info channel,
intptr_t  priv 
)

Handles the read request for calibbias attribute.

Handles the read request for calibbias attribute.

Parameters
dev- The iio device structure.
buf- Command buffer to be filled with requested data.
len- Length of the received command buffer in bytes.
channel- Command channel info.
priv- Command attribute id.
Returns
the size of the read data in case of success, error code otherwise.

◆ adis_iio_read_calibscale()

int adis_iio_read_calibscale ( void *  dev,
char *  buf,
uint32_t  len,
const struct iio_ch_info channel,
intptr_t  priv 
)

Handles the read request for calibscale attribute.

Handles the read request for calibscale attribute.

Parameters
dev- The iio device structure.
buf- Command buffer to be filled with requested data.
len- Length of the received command buffer in bytes.
channel- Command channel info.
priv- Command attribute id.
Returns
the size of the read data in case of success, error code otherwise.

◆ adis_iio_read_debug_attrs()

int adis_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.

Callback for adis iio debug attributes reading.

Parameters
dev- The iio device structure.
buf- Command buffer to be filled with requested data.
len- Length of the received command buffer in bytes.
channel- Command channel info.
priv- Command attribute id.
Returns
the size of the read data in case of success, error code otherwise.

◆ adis_iio_read_lpf()

int adis_iio_read_lpf ( void *  dev,
char *  buf,
uint32_t  len,
const struct iio_ch_info channel,
intptr_t  priv 
)

Handles the read request for lpf attribute.

Handles the read request for lpf attribute.

Parameters
dev- The iio device structure.
buf- Command buffer to be filled with requested data.
len- Length of the received command buffer in bytes.
channel- Command channel info.
priv- Command attribute id.
Returns
the size of the read data in case of success, error code otherwise.

◆ adis_iio_read_offset()

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.

Handles the read request for offset attribute.

Parameters
dev- The iio device structure.
buf- Command buffer to be filled with requested data.
len- Length of the received command buffer in bytes.
channel- Command channel info.
priv- Command attribute id.
Returns
the size of the read data in case of success, error code otherwise.

◆ adis_iio_read_raw()

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.

Handles the read request for raw attribute.

Parameters
dev- The iio device structure.
buf- Command buffer to be filled with requested data.
len- Length of the received command buffer in bytes.
channel- Command channel info.
priv- Command attribute id.
Returns
the size of the read data in case of success, error code otherwise.

◆ adis_iio_read_reg()

int adis_iio_read_reg ( struct adis_iio_dev device,
uint32_t  reg,
uint32_t *  readval 
)

Wrapper for reading adis register.

Wrapper for reading adis register.

Parameters
device- The iio device structure.
reg- Address of the register to be read from.
readval- Read data.
Returns
ret - Result of the reading procedure.

◆ adis_iio_read_samples()

int adis_iio_read_samples ( void *  dev,
int *  buff,
uint32_t  samples 
)

Read adis iio samples for the active channels.

◆ adis_iio_read_sampling_freq()

int adis_iio_read_sampling_freq ( void *  dev,
char *  buf,
uint32_t  len,
const struct iio_ch_info channel,
intptr_t  priv 
)

Handles the read request for sampling frequency attribute.

Handles the read request for sampling frequency attribute.

Parameters
dev- The iio device structure.
buf- Command buffer to be filled with requested data.
len- Length of the received command buffer in bytes.
channel- Command channel info.
priv- Command attribute id.
Returns
the size of the read data in case of success, error code otherwise.

◆ adis_iio_read_scale()

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.

Handles the read request for scale attribute.

Parameters
dev- The iio device structure.
buf- Command buffer to be filled with requested data.
len- Length of the received command buffer in bytes.
channel- Command channel info.
priv- Command attribute id.
Returns
the size of the read data in case of success, error code otherwise.

◆ adis_iio_trigger_handler()

int adis_iio_trigger_handler ( struct iio_device_data dev_data)

Handles trigger: reads one data-set and writes it to the buffer.

Callback for adis iio data ready trigger.

Parameters
dev_data- The iio device data structure.
Returns
the size of the written data in case of success, error code otherwise.

◆ adis_iio_trigger_handler_with_fifo()

int adis_iio_trigger_handler_with_fifo ( struct iio_device_data dev_data)

Handles trigger: reads all available samples in FIFO and writes them to the buffer.

Parameters
dev_data- The iio device data structure.
Returns
the size of the written data in case of success, error code otherwise.

◆ adis_iio_write_calibbias()

int adis_iio_write_calibbias ( void *  dev,
char *  buf,
uint32_t  len,
const struct iio_ch_info channel,
intptr_t  priv 
)

Handles the write request for calibbias attribute.

Handles the write request for calibbias attribute.

Parameters
dev- The iio device structure.
buf- Command buffer to be filled with the data to be written.
len- Length of the received command buffer in bytes.
channel- Command channel info.
priv- Command attribute id.
Returns
the result of the writing procedure.

◆ adis_iio_write_calibscale()

int adis_iio_write_calibscale ( void *  dev,
char *  buf,
uint32_t  len,
const struct iio_ch_info channel,
intptr_t  priv 
)

Handles the write request for calibscale attribute.

Handles the write request for calibscale attribute.

Parameters
dev- The iio device structure.
buf- Command buffer to be filled with the data to be written.
len- Length of the received command buffer in bytes.
channel- Command channel info.
priv- Command attribute id.
Returns
the result of the writing procedure.

◆ adis_iio_write_debug_attrs()

int adis_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.

Callback for adis iio debug attributes writing.

Parameters
dev- The iio device structure.
buf- Command buffer to be filled with the data to be written.
len- Length of the received command buffer in bytes.
channel- Command channel info.
priv- Command attribute id.
Returns
the result of the writing procedure.

◆ adis_iio_write_lpf()

int adis_iio_write_lpf ( void *  dev,
char *  buf,
uint32_t  len,
const struct iio_ch_info channel,
intptr_t  priv 
)

Handles the write request for lpf attribute.

Handles the write request for lpf attribute.

Parameters
dev- The iio device structure.
buf- Command buffer to be filled with the data to be written.
len- Length of the received command buffer in bytes.
channel- Command channel info.
priv- Command attribute id.
Returns
the result of the writing procedure.

◆ adis_iio_write_reg()

int adis_iio_write_reg ( struct adis_iio_dev device,
uint32_t  reg,
uint32_t  writeval 
)

Wrapper for writing to adis register.

Wrapper for writing adis register.

Parameters
device- The iio device structure.
reg- Address of the register to be written to.
writeval- Data to be written.
Returns
ret - Result of the writing procedure.

◆ adis_iio_write_sampling_freq()

int adis_iio_write_sampling_freq ( void *  dev,
char *  buf,
uint32_t  len,
const struct iio_ch_info channel,
intptr_t  priv 
)

Handles the write request for sampling frequency attribute.

Handles the write request for sampling frequency attribute.

Parameters
dev- The iio device structure.
buf- Command buffer to be filled with the data to be written.
len- Length of the received command buffer in bytes.
channel- Command channel info.
priv- Command attribute id.
Returns
the result of the writing procedure.

Variable Documentation

◆ adis_dev_attrs

struct iio_attribute adis_dev_attrs[]

◆ adis_iio_accel_attrs

struct iio_attribute adis_iio_accel_attrs[]

◆ adis_iio_anglvel_attrs

struct iio_attribute adis_iio_anglvel_attrs[]

◆ adis_iio_delta_angl_attrs

struct iio_attribute adis_iio_delta_angl_attrs[]

◆ adis_iio_delta_vel_attrs

struct iio_attribute adis_iio_delta_vel_attrs[]

◆ adis_iio_temp_attrs

struct iio_attribute adis_iio_temp_attrs[]

◆ adis_iio_trig_desc

struct iio_trigger adis_iio_trig_desc
IIO_ACCEL
@ IIO_ACCEL
Definition: iio_types.h:71
IIO_ANGL_VEL
@ IIO_ANGL_VEL
Definition: iio_types.h:68
IIO_TEMP
@ IIO_TEMP
Definition: iio_types.h:69
IIO_DELTA_ANGL
@ IIO_DELTA_ANGL
Definition: iio_types.h:79
IIO_DELTA_VELOCITY
@ IIO_DELTA_VELOCITY
Definition: iio_types.h:80