no-OS
iio.h
Go to the documentation of this file.
1 /***************************************************************************/
35 #ifndef IIO_H_
36 #define IIO_H_
37 
38 /******************************************************************************/
39 /***************************** Include Files **********************************/
40 /******************************************************************************/
41 
42 #include "iio_types.h"
43 #include "no_os_uart.h"
44 #if defined(NO_OS_NETWORKING) || defined(NO_OS_LWIP_NETWORKING)
45 #include "tcp_socket.h"
46 #endif
47 
48 /******************************************************************************/
49 /*************************** Types Declarations *******************************/
50 /******************************************************************************/
51 
56 };
57 
58 struct iio_desc;
59 
61  char *name;
62  void *dev;
64  /*
65  * IIO buffer implementation can use a user provided buffer in raw_buf.
66  * If raw_buf is NULL and iio_device has buffer callback function set,
67  * it will allocate memory for it when needed.
68  */
69  int8_t *raw_buf;
70  /* Length of raw_buf */
71  uint32_t raw_buf_len;
72  /* If set, trigger will be linked to this device */
73  char *trigger_id;
74 };
75 
77  char *name;
78  void *trig;
80 };
81 
86 struct iio_ctx_attr {
88  const char *name;
90  const char *value;
91 };
92 
98  int(*local_backend_event_read)(void *conn, uint8_t *buf, uint32_t len);
99  int(*local_backend_event_write)(void *conn, uint8_t *buf, uint32_t len);
102 };
103 
106  union {
108 #if defined(NO_OS_NETWORKING) || defined(NO_OS_LWIP_NETWORKING)
109  struct tcp_socket_init_param *tcp_socket_init_param;
110 #endif
111  };
114  uint32_t nb_ctx_attr;
116  uint32_t nb_devs;
118  uint32_t nb_trigs;
119 };
120 
121 /******************************************************************************/
122 /************************ Functions Declarations ******************************/
123 /******************************************************************************/
124 
125 /* Set communication ops and read/write ops. */
126 int iio_init(struct iio_desc **desc, struct iio_init_param *init_param);
127 /* Free the resources allocated by iio_init(). */
128 int iio_remove(struct iio_desc *desc);
129 /* Execut an iio step. */
130 int iio_step(struct iio_desc *desc);
131 /* Signal iio that a trigger has been triggered.
132  * This will be called in interrupt context. An application callback will be
133  called in interrupt context if trigger is synchronous with the interrupt
134  (is_synchronous = true) or will be called from iio_step if trigger is
135  asynchronous (is_synchronous = false) */
136 int iio_process_trigger_type(struct iio_desc *desc, char *trigger_name);
137 
138 int32_t iio_parse_value(char *buf, enum iio_val fmt,
139  int32_t *val, int32_t *val2);
140 int iio_format_value(char *buf, uint32_t len, enum iio_val fmt,
141  int32_t size, int32_t *vals);
142 
143 /* DMA buffer functions. */
144 /* Get buffer addr where to write iio_buffer.size bytes */
145 int iio_buffer_get_block(struct iio_buffer *buffer, void **addr);
146 /* To be called to mark last iio_buffer_read as done */
147 int iio_buffer_block_done(struct iio_buffer *buffer);
148 
149 /* Trigger buffer functions. */
150 /* Write to buffer iio_buffer.bytes_per_scan bytes from data */
151 int iio_buffer_push_scan(struct iio_buffer *buffer, void *data);
152 /* Read from buffer iio_buffer.bytes_per_scan bytes into data */
153 int iio_buffer_pop_scan(struct iio_buffer *buffer, void *data);
154 
155 #endif /* IIO_H_ */
IIO_ACCEL
@ IIO_ACCEL
Definition: iio_types.h:71
iio_device::read_dev
int32_t(* read_dev)(void *dev, void *buff, uint32_t nb_samples)
Definition: iio_types.h:265
no_os_alloc.h
IIO_COUNT
@ IIO_COUNT
Definition: iio_types.h:78
IIO_DIRECTION_INPUT
@ IIO_DIRECTION_INPUT
Definition: iio_types.h:200
iio_buffer::samples
uint32_t samples
Definition: iio_types.h:217
IIO_VAL_INT_PLUS_MICRO_DB
@ IIO_VAL_INT_PLUS_MICRO_DB
Definition: iio_types.h:53
iio_remove
int iio_remove(struct iio_desc *desc)
Free the resources allocated by "iio_init()".
Definition: iio.c:2029
no_os_div_s64_rem
int64_t no_os_div_s64_rem(int64_t dividend, int32_t divisor, int32_t *remainder)
IIO_ANGL_VEL
@ IIO_ANGL_VEL
Definition: iio_types.h:68
IIO_VAL_INT
@ IIO_VAL_INT
Definition: iio_types.h:50
iio_channel
Struct describing the scan type.
Definition: iio_types.h:168
IIO_VAL_INT_PLUS_NANO
@ IIO_VAL_INT_PLUS_NANO
Definition: iio_types.h:52
scan_type::sign
char sign
Definition: iio_types.h:153
iio_buffer_pop_scan
int iio_buffer_pop_scan(struct iio_buffer *buffer, void *data)
Definition: iio.c:1443
no_os_uart_write
int32_t no_os_uart_write(struct no_os_uart_desc *desc, const uint8_t *data, uint32_t bytes_number)
Write to UART.
Definition: no_os_uart.c:144
IIO_SHARED_BY_TYPE
@ IIO_SHARED_BY_TYPE
Definition: iio_types.h:120
iio_remove
int iio_remove(struct iio_desc *desc)
Free the resources allocated by "iio_init()".
Definition: iio.c:2029
iio_init_param::nb_trigs
uint32_t nb_trigs
Definition: iio.h:118
IIO_SEPARATE
@ IIO_SEPARATE
Definition: iio_types.h:119
iio_device::channels
struct iio_channel * channels
Definition: iio_types.h:254
iiod_ops::open
int(* open)(struct iiod_ctx *ctx, const char *device, uint32_t samples, uint32_t mask, bool cyclic)
Definition: iiod.h:109
iio_dev_priv::name
const char * name
Definition: iio.c:171
iiod_ctx::instance
void * instance
Definition: iiod.h:73
IIO_VAL_FRACTIONAL_LOG2
@ IIO_VAL_FRACTIONAL_LOG2
Definition: iio_types.h:56
iio_device_data::dev
void * dev
Definition: iio_types.h:227
iio_desc::ctx_attrs
struct iio_ctx_attr * ctx_attrs
Definition: iio.c:210
iio_init
int iio_init(struct iio_desc **desc, struct iio_init_param *init_param)
Set communication ops and read/write ops.
Definition: iio.c:1890
no_os_bswap_constant_32
#define no_os_bswap_constant_32(x)
Definition: no_os_util.h:95
iio_local_backend::local_backend_buff_len
uint32_t local_backend_buff_len
Definition: iio.h:101
iio_trig_priv::descriptor
struct iio_trigger * descriptor
Definition: iio.c:199
iiod.h
Header file of iiod.
iiod_conn_data::conn
void * conn
Definition: iiod.h:80
iio_desc
Definition: iio.c:204
iio_ch_info
Structure holding channel attributess.
Definition: iio_types.h:103
iio_trigger_init
Definition: iio.h:76
MAX_TRIG_ID
#define MAX_TRIG_ID
Definition: iiod.h:48
IIO_VAL_INT_PLUS_MICRO
@ IIO_VAL_INT_PLUS_MICRO
Definition: iio_types.h:51
NO_OS_EOVERRUN
#define NO_OS_EOVERRUN
Definition: no_os_error.h:47
iio_buffer::bytes_per_scan
uint32_t bytes_per_scan
Definition: iio_types.h:215
no_os_uart_read
int32_t no_os_uart_read(struct no_os_uart_desc *desc, uint8_t *data, uint32_t bytes_number)
Read data from UART.
Definition: no_os_uart.c:118
iio_attribute::show
int(* show)(void *device, char *buf, uint32_t len, const struct iio_ch_info *channel, intptr_t priv)
Definition: iio_types.h:140
IIO_MOD_PITCH
@ IIO_MOD_PITCH
Definition: iio_types.h:94
scan_type::is_big_endian
bool is_big_endian
Definition: iio_types.h:161
iio_channel::diferential
bool diferential
Definition: iio_types.h:196
iiod_desc
Definition: iiod_private.h:163
IIO_MOD_Z
@ IIO_MOD_Z
Definition: iio_types.h:92
scan_type::storagebits
uint8_t storagebits
Definition: iio_types.h:157
IIO_VAL_FRACTIONAL
@ IIO_VAL_FRACTIONAL
Definition: iio_types.h:55
NO_OS_IS_ERR_VALUE
#define NO_OS_IS_ERR_VALUE(x)
Definition: no_os_error.h:50
iio_dev_priv::dev_descriptor
struct iio_device * dev_descriptor
Definition: iio.c:179
iiod_attr::channel
const char * channel
Definition: iiod.h:68
no_os_delay.h
Header file of Delay functions.
USE_LOCAL_BACKEND
@ USE_LOCAL_BACKEND
Definition: iio.h:54
no_os_max
#define no_os_max(x, y)
Definition: no_os_util.h:64
iio_buffer_push_scan
int iio_buffer_push_scan(struct iio_buffer *buffer, void *data)
Definition: iio.c:1434
iio_desc::xml_desc
char * xml_desc
Definition: iio.c:208
iio_trigger::disable
int(* disable)(void *trig)
Definition: iio_types.h:240
iio_buffer_priv::public
struct iio_buffer public
Definition: iio.c:149
iiod_init_param::xml_len
uint32_t xml_len
Definition: iiod.h:170
iio_init_param
Definition: iio.h:104
iio_desc::iiod
struct iiod_desc * iiod
Definition: iio.c:205
iio_init_param::phy_type
enum physical_link_type phy_type
Definition: iio.h:105
device
Definition: ad9361_util.h:69
IIO_RESISTANCE
@ IIO_RESISTANCE
Definition: iio_types.h:72
iio_buffer_priv::raw_buf
int8_t * raw_buf
Definition: iio.c:153
iio_device::write_dev
int32_t(* write_dev)(void *dev, void *buff, uint32_t nb_samples)
Definition: iio_types.h:270
iio_local_backend
Structure holding the local backend init parameters.
Definition: iio.h:97
IIO_ALTVOLTAGE
@ IIO_ALTVOLTAGE
Definition: iio_types.h:67
iio_channel::ch_type
enum iio_chan_type ch_type
Definition: iio_types.h:172
iiod_init_param::phy_type
enum physical_link_type phy_type
Definition: iiod.h:172
no_os_circular_buffer::buff
int8_t * buff
Definition: no_os_circular_buffer.h:71
no_os_calloc
void * no_os_calloc(size_t nitems, size_t size)
Allocate memory and return a pointer to it, set memory to 0.
Definition: chibios_alloc.c:54
iio_buffer_block_done
int iio_buffer_block_done(struct iio_buffer *buffer)
Definition: iio.c:1422
iio_trig_priv::triggered
bool triggered
Definition: iio.c:201
no_os_cb_prepare_async_write
int32_t no_os_cb_prepare_async_write(struct no_os_circular_buffer *desc, uint32_t raw_size_to_write, void **write_buff, uint32_t *raw_size_avilable)
iio_device::post_disable
int32_t(* post_disable)(void *dev)
Definition: iio_types.h:276
attr_fun_params::ch_info
struct iio_ch_info * ch_info
Definition: iio.c:144
iio_attr_type
iio_attr_type
Definition: iiod.h:52
iio_buffer_priv
Definition: iio.c:147
iio_buffer_pop_scan
int iio_buffer_pop_scan(struct iio_buffer *buffer, void *data)
Definition: iio.c:1443
iio_channel::channel2
int channel2
Definition: iio_types.h:178
iiod_ops::close
int(* close)(struct iiod_ctx *ctx, const char *device)
Definition: iiod.h:112
iio_device::debug_reg_read
int32_t(* debug_reg_read)(void *dev, uint32_t reg, uint32_t *readval)
Definition: iio_types.h:283
iiod_conn_add
int32_t iiod_conn_add(struct iiod_desc *desc, struct iiod_conn_data *data, uint32_t *new_conn_id)
Definition: iiod.c:393
iiod_init_param::instance
void * instance
Definition: iiod.h:163
iio_init
int iio_init(struct iio_desc **desc, struct iio_init_param *init_param)
Set communication ops and read/write ops.
Definition: iio.c:1890
iio_channel::ch_out
bool ch_out
Definition: iio_types.h:188
iio_device_init::trigger_id
char * trigger_id
Definition: iio.h:73
iio_init_param::local_backend
struct iio_local_backend * local_backend
Definition: iio.h:112
no_os_div_s64
int64_t no_os_div_s64(int64_t dividend, int32_t divisor)
iio_trigger_init::trig
void * trig
Definition: iio.h:78
no_os_cb_end_async_write
int32_t no_os_cb_end_async_write(struct no_os_circular_buffer *desc)
IIOD_PORT
#define IIOD_PORT
Definition: iio.c:69
IIO_SHARED_BY_ALL
@ IIO_SHARED_BY_ALL
Definition: iio_types.h:122
iio_init_param::ctx_attrs
struct iio_ctx_attr * ctx_attrs
Definition: iio.h:113
no_os_min
#define no_os_min(x, y)
Definition: no_os_util.h:59
iiod_ctx
Definition: iiod.h:71
iiod_init_param
Definition: iiod.h:160
iio_init_param::uart_desc
struct no_os_uart_desc * uart_desc
Definition: iio.h:107
iio_channel::channel
int channel
Definition: iio_types.h:174
iio_device::pre_enable
int32_t(* pre_enable)(void *dev, uint32_t mask)
Definition: iio_types.h:274
no_os_uart_desc
Stucture holding the UART descriptor.
Definition: no_os_uart.h:134
iio.h
Header file of iio.
no_os_error.h
Error codes definition.
USE_NETWORK
@ USE_NETWORK
Definition: iio.h:55
iio_attribute::shared
enum iio_attribute_shared shared
Definition: iio_types.h:138
iio_trig_priv
Links a physical trigger instance "void *instance" with a "iio_trigger *descriptor" that describes ca...
Definition: iio.c:191
iio_ctx_attr::value
const char * value
Definition: iio.h:90
scan_type::shift
uint8_t shift
Definition: iio_types.h:159
IIOD_MAX_CONNECTIONS
#define IIOD_MAX_CONNECTIONS
Definition: iiod.h:43
iio_attribute::store
int(* store)(void *device, char *buf, uint32_t len, const struct iio_ch_info *channel, intptr_t priv)
Definition: iio_types.h:143
IIO_MOD_Y
@ IIO_MOD_Y
Definition: iio_types.h:91
iio_attribute::name
const char * name
Definition: iio_types.h:131
iio_buffer_priv::allocated
bool allocated
Definition: iio.c:159
iio_desc::devs
struct iio_dev_priv * devs
Definition: iio.c:212
iio_buffer_block_done
int iio_buffer_block_done(struct iio_buffer *buffer)
Definition: iio.c:1422
iiod_init_param::xml
char * xml
Definition: iiod.h:168
iiod_ops::refill_buffer
int(* refill_buffer)(struct iiod_ctx *ctx, const char *device)
Definition: iiod.h:118
iio_channel::name
const char * name
Definition: iio_types.h:170
iio_device::debug_attributes
struct iio_attribute * debug_attributes
Definition: iio_types.h:258
iiod_init_param::ops
struct iiod_ops * ops
Definition: iiod.h:161
IIO_VAL_CHAR
@ IIO_VAL_CHAR
Definition: iio_types.h:57
iio_ctx_attr::name
const char * name
Definition: iio.h:88
iio_device::submit
int32_t(* submit)(struct iio_device_data *dev)
Definition: iio_types.h:278
iiod_conn_data::buf
char * buf
Definition: iiod.h:82
iiod_init
int32_t iiod_init(struct iiod_desc **desc, struct iiod_init_param *param)
Definition: iiod.c:347
iio_buffer::size
uint32_t size
Definition: iio_types.h:213
iiod_ops::write_buffer
int(* write_buffer)(struct iiod_ctx *ctx, const char *device, const char *buf, uint32_t bytes)
Definition: iiod.h:121
iio_buffer::cyclic_info
struct iio_cyclic_buffer_info cyclic_info
Definition: iio_types.h:223
iio_buffer_get_block
int iio_buffer_get_block(struct iio_buffer *buffer, void **addr)
Definition: iio.c:1409
iio_trigger_init::descriptor
struct iio_trigger * descriptor
Definition: iio.h:79
iio_device_init::name
char * name
Definition: iio.h:61
IIO_ATTR_TYPE_DEVICE
@ IIO_ATTR_TYPE_DEVICE
Definition: iiod.h:57
iiod_ops::set_buffers_count
int(* set_buffers_count)(struct iiod_ctx *ctx, const char *device, uint32_t buffers_count)
Definition: iiod.h:149
iio_buffer_direction
iio_buffer_direction
Definition: iio_types.h:199
iio_attribute
Structure holding pointers to show and store functions.
Definition: iio_types.h:129
iiod_ops::get_trigger
int(* get_trigger)(struct iiod_ctx *ctx, const char *device, char *trigger, uint32_t len)
Definition: iiod.h:136
iiod_ctx::conn
void * conn
Definition: iiod.h:75
iiod_remove
void iiod_remove(struct iiod_desc *desc)
Definition: iiod.c:376
attr_fun_params::len
uint32_t len
Definition: iio.c:143
iio_desc::uart_desc
struct no_os_uart_desc * uart_desc
Definition: iio.c:216
iio_buffer
Definition: iio_types.h:209
REG_ACCESS_ATTRIBUTE
#define REG_ACCESS_ATTRIBUTE
Definition: iio.c:71
iio_buffer_priv::initalized
bool initalized
Definition: iio.c:157
iio_buffer::active_mask
uint32_t active_mask
Definition: iio_types.h:211
iiod_ops::read_attr
int(* read_attr)(struct iiod_ctx *ctx, const char *device, struct iiod_attr *attr, char *buf, uint32_t len)
Definition: iiod.h:130
no_os_circular_buffer.h
Circular buffer library header.
iio_init_param::devs
struct iio_device_init * devs
Definition: iio.h:115
iio_buffer::buf
struct no_os_circular_buffer * buf
Definition: iio_types.h:221
IIO_ATTR_TYPE_DEBUG
@ IIO_ATTR_TYPE_DEBUG
Definition: iiod.h:53
IIO_CURRENT
@ IIO_CURRENT
Definition: iio_types.h:66
iio_parse_value
int32_t iio_parse_value(char *buf, enum iio_val fmt, int32_t *val, int32_t *val2)
Definition: iio.c:630
IIO_WEIGHT
@ IIO_WEIGHT
Definition: iio_types.h:81
IIO_MOD_YAW
@ IIO_MOD_YAW
Definition: iio_types.h:95
iio_desc::recv
int(* recv)(void *conn, uint8_t *buf, uint32_t len)
Definition: iio.c:217
IIO_VOLTAGE
@ IIO_VOLTAGE
Definition: iio_types.h:65
iio_init_param::nb_ctx_attr
uint32_t nb_ctx_attr
Definition: iio.h:114
IIO_ANGL
@ IIO_ANGL
Definition: iio_types.h:76
IIOD_CONN_BUFFER_SIZE
#define IIOD_CONN_BUFFER_SIZE
Definition: iio.c:72
IIO_MOD_TEMP_AMBIENT
@ IIO_MOD_TEMP_AMBIENT
Definition: iio_types.h:93
iio_dev_priv::dev_data
struct iio_device_data dev_data
Definition: iio.c:175
NO_OS_TOSTRING
#define NO_OS_TOSTRING(x)
Definition: iio.c:76
iio_dev_priv
Links a physical device instance "void *dev_instance" with a "iio_device *iio" that describes capabil...
Definition: iio.c:167
iio_dev_priv::dev_id
char dev_id[MAX_DEV_ID]
Definition: iio.c:169
MAX_DEV_ID
#define MAX_DEV_ID
Definition: iiod.h:47
iio_desc::nb_ctx_attr
uint32_t nb_ctx_attr
Definition: iio.c:211
iio_device_data::buffer
struct iio_buffer * buffer
Definition: iio_types.h:228
iio_val
iio_val
Definition: iio_types.h:49
iio_dev_priv::buffer
struct iio_buffer_priv buffer
Definition: iio.c:181
iio_cyclic_buffer_info::buff_index
uint32_t buff_index
Definition: iio_types.h:206
IIO_CAPACITANCE
@ IIO_CAPACITANCE
Definition: iio_types.h:70
iio_trigger_init::name
char * name
Definition: iio.h:77
IIO_DIRECTION_OUTPUT
@ IIO_DIRECTION_OUTPUT
Definition: iio_types.h:201
iio_buffer_priv::cb
struct no_os_circular_buffer cb
Definition: iio.c:151
iiod_attr::name
const char * name
Definition: iiod.h:67
iiod_conn_data
Definition: iiod.h:78
no_os_cb_prepare_async_read
int32_t no_os_cb_prepare_async_read(struct no_os_circular_buffer *desc, uint32_t raw_size_to_read, void **read_buff, uint32_t *raw_size_avilable)
MAX_CHN_ID
#define MAX_CHN_ID
Definition: iiod.h:49
iiod_ops::set_trigger
int(* set_trigger)(struct iiod_ctx *ctx, const char *device, const char *trigger, uint32_t len)
Definition: iiod.h:142
iio_init_param::trigs
struct iio_trigger_init * trigs
Definition: iio.h:117
iio_format_value
int iio_format_value(char *buf, uint32_t len, enum iio_val fmt, int32_t size, int32_t *vals)
Definition: iio.c:686
iio_desc::send
int(* send)(void *conn, uint8_t *buf, uint32_t len)
Definition: iio.c:218
no_os_cb_init
int32_t no_os_cb_init(struct no_os_circular_buffer **desc, uint32_t size)
no_os_cb_remove
int32_t no_os_cb_remove(struct no_os_circular_buffer *desc)
iio_device::buffer_attributes
struct iio_attribute * buffer_attributes
Definition: iio_types.h:260
iiod_ops::read_buffer
int(* read_buffer)(struct iiod_ctx *ctx, const char *device, char *buf, uint32_t bytes)
Definition: iiod.h:115
iio_init_param::nb_devs
uint32_t nb_devs
Definition: iio.h:116
iio_dev_priv::dev_instance
void * dev_instance
Definition: iio.c:173
iio_process_trigger_type
int iio_process_trigger_type(struct iio_desc *desc, char *trigger_name)
Searches for trigger name and processes the trigger based on its type (sync or async with the interru...
Definition: iio.c:1091
attr_fun_params::buf
char * buf
Definition: iio.c:142
iio_channel::attributes
struct iio_attribute * attributes
Definition: iio_types.h:186
iio_types.h
Header file for iio_types.
iio_device::num_ch
uint16_t num_ch
Definition: iio_types.h:252
iio_channel::scan_type
struct scan_type * scan_type
Definition: iio_types.h:184
no_os_free
void no_os_free(void *ptr)
Deallocate memory previously allocated by a call to no_os_calloc or no_os_malloc.
Definition: chibios_alloc.c:69
IIO_MOD_X
@ IIO_MOD_X
Definition: iio_types.h:90
iio_device_init::dev_descriptor
struct iio_device * dev_descriptor
Definition: iio.h:63
IIO_TEMP
@ IIO_TEMP
Definition: iio_types.h:69
iio_dev_priv::active_reg_addr
uint32_t active_reg_addr
Definition: iio.c:177
IIO_MOD_ROLL
@ IIO_MOD_ROLL
Definition: iio_types.h:96
iio_process_trigger_type
int iio_process_trigger_type(struct iio_desc *desc, char *trigger_name)
Searches for trigger name and processes the trigger based on its type (sync or async with the interru...
Definition: iio.c:1091
iio_device::trigger_handler
int32_t(* trigger_handler)(struct iio_device_data *dev)
Definition: iio_types.h:280
no_os_list.h
List library header.
iio_desc::phy_desc
void * phy_desc
Definition: iio.c:207
iio_buffer::dir
enum iio_buffer_direction dir
Definition: iio_types.h:219
IIO_ATTR_TYPE_CH_IN
@ IIO_ATTR_TYPE_CH_IN
Definition: iiod.h:56
iio_device_init::dev
void * dev
Definition: iio.h:62
NULL
#define NULL
Definition: wrapper.h:64
iio_trigger
Definition: iio_types.h:231
iiod_attr::type
enum iio_attr_type type
Definition: iiod.h:61
no_os_cb_cfg
int32_t no_os_cb_cfg(struct no_os_circular_buffer *desc, int8_t *buf, uint32_t size)
iio_channel::modified
bool modified
Definition: iio_types.h:191
iio_desc::nb_devs
uint32_t nb_devs
Definition: iio.c:213
iio_channel::scan_index
int scan_index
Definition: iio_types.h:182
iio_dev_priv::trig_idx
uint32_t trig_idx
Definition: iio.c:183
IIO_ATTR_TYPE_CH_OUT
@ IIO_ATTR_TYPE_CH_OUT
Definition: iiod.h:55
IIO_MAGN
@ IIO_MAGN
Definition: iio_types.h:73
no_os_shift_right
#define no_os_shift_right(x, s)
Definition: no_os_util.h:119
init_param
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
iio_desc::trigs
struct iio_trig_priv * trigs
Definition: iio.c:214
iio_device
Structure holding channels and attributes of a device.
Definition: iio_types.h:247
no_os_cb_write
int32_t no_os_cb_write(struct no_os_circular_buffer *desc, const void *data, uint32_t nb_elements)
iio_device_init::raw_buf_len
uint32_t raw_buf_len
Definition: iio.h:71
IIO_INCLI
@ IIO_INCLI
Definition: iio_types.h:74
iiod_ops::send
int(* send)(struct iiod_ctx *ctx, uint8_t *buf, uint32_t len)
Definition: iiod.h:98
iiod_ops::write_attr
int(* write_attr)(struct iiod_ctx *ctx, const char *device, struct iiod_attr *attr, char *buf, uint32_t len)
Definition: iiod.h:133
iio_cyclic_buffer_info::is_cyclic
bool is_cyclic
Definition: iio_types.h:205
no_os_circular_buffer
Circular buffer descriptor.
Definition: no_os_circular_buffer.h:67
iiod_ops::push_buffer
int(* push_buffer)(struct iiod_ctx *ctx, const char *device)
Definition: iiod.h:124
attr_fun_params
Definition: iio.c:140
iio_trigger::attributes
struct iio_attribute * attributes
Definition: iio_types.h:236
iio_trig_priv::id
char id[MAX_TRIG_ID]
Definition: iio.c:193
iio_step
int iio_step(struct iio_desc *desc)
Execute an iio step.
Definition: iio.c:1510
iio_trig_priv::name
char * name
Definition: iio.c:195
iio_desc::nb_trigs
uint32_t nb_trigs
Definition: iio.c:215
IIO_ROT
@ IIO_ROT
Definition: iio_types.h:77
iio_trigger::enable
int(* enable)(void *trig)
Definition: iio_types.h:238
NO_TRIGGER
#define NO_TRIGGER
Definition: iio.c:73
iiod_conn_step
int32_t iiod_conn_step(struct iiod_desc *desc, uint32_t conn_id)
Definition: iiod.c:905
attr_fun_params::dev_instance
void * dev_instance
Definition: iio.c:141
iiod_ops
Definition: iiod.h:88
IIO_ATTR_TYPE_BUFFER
@ IIO_ATTR_TYPE_BUFFER
Definition: iiod.h:54
iio_ctx_attr
Structure holding the context attribute members.
Definition: iio.h:86
iiod_attr
Definition: iiod.h:60
iio_desc::conns
struct no_os_circular_buffer * conns
Definition: iio.c:220
iio_local_backend::local_backend_buff
char * local_backend_buff
Definition: iio.h:100
no_os_uart.h
Header file of UART interface.
iio_trigger::is_synchronous
bool is_synchronous
Definition: iio_types.h:234
IIO_DELTA_ANGL
@ IIO_DELTA_ANGL
Definition: iio_types.h:79
iio_trig_priv::instance
void * instance
Definition: iio.c:197
iio_local_backend::local_backend_event_read
int(* local_backend_event_read)(void *conn, uint8_t *buf, uint32_t len)
Definition: iio.h:98
iio_local_backend::local_backend_event_write
int(* local_backend_event_write)(void *conn, uint8_t *buf, uint32_t len)
Definition: iio.h:99
iio_buffer_get_block
int iio_buffer_get_block(struct iio_buffer *buffer, void **addr)
Definition: iio.c:1409
no_os_util.h
Header file of utility functions.
iio_format_value
int iio_format_value(char *buf, uint32_t len, enum iio_val fmt, int32_t size, int32_t *vals)
Definition: iio.c:686
iio_device_data
Definition: iio_types.h:226
iio_device::debug_reg_write
int32_t(* debug_reg_write)(void *dev, uint32_t reg, uint32_t writeval)
Definition: iio_types.h:285
iio_device_init
Definition: iio.h:60
IIO_VELOCITY
@ IIO_VELOCITY
Definition: iio_types.h:75
iio_desc::xml_size
uint32_t xml_size
Definition: iio.c:209
no_os_cb_size
int32_t no_os_cb_size(struct no_os_circular_buffer *desc, uint32_t *size)
iio_device_init::raw_buf
int8_t * raw_buf
Definition: iio.h:69
dev_id
dev_id
Definition: ad9361.h:3328
no_os_cb_end_async_read
int32_t no_os_cb_end_async_read(struct no_os_circular_buffer *desc)
iiod_conn_remove
int32_t iiod_conn_remove(struct iiod_desc *desc, uint32_t conn_id, struct iiod_conn_data *data)
Definition: iiod.c:423
iiod_ops::recv
int(* recv)(struct iiod_ctx *ctx, uint8_t *buf, uint32_t len)
Definition: iiod.h:99
IIO_SHARED_BY_DIR
@ IIO_SHARED_BY_DIR
Definition: iio_types.h:121
iio_buffer_priv::raw_buf_len
uint32_t raw_buf_len
Definition: iio.c:155
iio_step
int iio_step(struct iio_desc *desc)
Execute an iio step.
Definition: iio.c:1510
iio_channel::address
unsigned long address
Definition: iio_types.h:180
physical_link_type
physical_link_type
Definition: iio.h:52
iio_buffer_push_scan
int iio_buffer_push_scan(struct iio_buffer *buffer, void *data)
Definition: iio.c:1434
IIO_DELTA_VELOCITY
@ IIO_DELTA_VELOCITY
Definition: iio_types.h:80
iio_device::attributes
struct iio_attribute * attributes
Definition: iio_types.h:256
NO_OS_DIV_ROUND_CLOSEST
#define NO_OS_DIV_ROUND_CLOSEST(x, y)
Definition: no_os_util.h:54
IIO_VAL_INT_MULTIPLE
@ IIO_VAL_INT_MULTIPLE
Definition: iio_types.h:54
iio_parse_value
int32_t iio_parse_value(char *buf, enum iio_val fmt, int32_t *val, int32_t *val2)
Definition: iio.c:630
iio_channel::indexed
bool indexed
Definition: iio_types.h:194
USE_UART
@ USE_UART
Definition: iio.h:53
no_os_cb_read
int32_t no_os_cb_read(struct no_os_circular_buffer *desc, void *data, uint32_t nb_elements)
iio_desc::iiod_ops
struct iiod_ops iiod_ops
Definition: iio.c:206
scan_type::realbits
uint8_t realbits
Definition: iio_types.h:155