Go to the documentation of this file.
44 #if defined(NO_OS_NETWORKING) || defined(NO_OS_LWIP_NETWORKING)
45 #include "tcp_socket.h"
108 #if defined(NO_OS_NETWORKING) || defined(NO_OS_LWIP_NETWORKING)
109 struct tcp_socket_init_param *tcp_socket_init_param;
139 int32_t *val, int32_t *val2);
141 int32_t size, int32_t *vals);
@ IIO_ACCEL
Definition: iio_types.h:71
int32_t(* read_dev)(void *dev, void *buff, uint32_t nb_samples)
Definition: iio_types.h:265
@ IIO_COUNT
Definition: iio_types.h:78
@ IIO_DIRECTION_INPUT
Definition: iio_types.h:200
uint32_t samples
Definition: iio_types.h:217
@ IIO_VAL_INT_PLUS_MICRO_DB
Definition: iio_types.h:53
int iio_remove(struct iio_desc *desc)
Free the resources allocated by "iio_init()".
Definition: iio.c:2029
int64_t no_os_div_s64_rem(int64_t dividend, int32_t divisor, int32_t *remainder)
@ IIO_ANGL_VEL
Definition: iio_types.h:68
@ IIO_VAL_INT
Definition: iio_types.h:50
Struct describing the scan type.
Definition: iio_types.h:168
@ IIO_VAL_INT_PLUS_NANO
Definition: iio_types.h:52
char sign
Definition: iio_types.h:153
int iio_buffer_pop_scan(struct iio_buffer *buffer, void *data)
Definition: iio.c:1443
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
Definition: iio_types.h:120
int iio_remove(struct iio_desc *desc)
Free the resources allocated by "iio_init()".
Definition: iio.c:2029
uint32_t nb_trigs
Definition: iio.h:118
@ IIO_SEPARATE
Definition: iio_types.h:119
struct iio_channel * channels
Definition: iio_types.h:254
int(* open)(struct iiod_ctx *ctx, const char *device, uint32_t samples, uint32_t mask, bool cyclic)
Definition: iiod.h:109
const char * name
Definition: iio.c:171
void * instance
Definition: iiod.h:73
@ IIO_VAL_FRACTIONAL_LOG2
Definition: iio_types.h:56
void * dev
Definition: iio_types.h:227
struct iio_ctx_attr * ctx_attrs
Definition: iio.c:210
int iio_init(struct iio_desc **desc, struct iio_init_param *init_param)
Set communication ops and read/write ops.
Definition: iio.c:1890
#define no_os_bswap_constant_32(x)
Definition: no_os_util.h:95
uint32_t local_backend_buff_len
Definition: iio.h:101
struct iio_trigger * descriptor
Definition: iio.c:199
void * conn
Definition: iiod.h:80
Structure holding channel attributess.
Definition: iio_types.h:103
#define MAX_TRIG_ID
Definition: iiod.h:48
@ IIO_VAL_INT_PLUS_MICRO
Definition: iio_types.h:51
#define NO_OS_EOVERRUN
Definition: no_os_error.h:47
uint32_t bytes_per_scan
Definition: iio_types.h:215
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
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
Definition: iio_types.h:94
bool is_big_endian
Definition: iio_types.h:161
bool diferential
Definition: iio_types.h:196
Definition: iiod_private.h:163
@ IIO_MOD_Z
Definition: iio_types.h:92
uint8_t storagebits
Definition: iio_types.h:157
@ IIO_VAL_FRACTIONAL
Definition: iio_types.h:55
#define NO_OS_IS_ERR_VALUE(x)
Definition: no_os_error.h:50
struct iio_device * dev_descriptor
Definition: iio.c:179
const char * channel
Definition: iiod.h:68
Header file of Delay functions.
@ USE_LOCAL_BACKEND
Definition: iio.h:54
#define no_os_max(x, y)
Definition: no_os_util.h:64
int iio_buffer_push_scan(struct iio_buffer *buffer, void *data)
Definition: iio.c:1434
char * xml_desc
Definition: iio.c:208
int(* disable)(void *trig)
Definition: iio_types.h:240
struct iio_buffer public
Definition: iio.c:149
uint32_t xml_len
Definition: iiod.h:170
struct iiod_desc * iiod
Definition: iio.c:205
enum physical_link_type phy_type
Definition: iio.h:105
Definition: ad9361_util.h:69
@ IIO_RESISTANCE
Definition: iio_types.h:72
int8_t * raw_buf
Definition: iio.c:153
int32_t(* write_dev)(void *dev, void *buff, uint32_t nb_samples)
Definition: iio_types.h:270
Structure holding the local backend init parameters.
Definition: iio.h:97
@ IIO_ALTVOLTAGE
Definition: iio_types.h:67
enum iio_chan_type ch_type
Definition: iio_types.h:172
enum physical_link_type phy_type
Definition: iiod.h:172
int8_t * buff
Definition: no_os_circular_buffer.h:71
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
int iio_buffer_block_done(struct iio_buffer *buffer)
Definition: iio.c:1422
bool triggered
Definition: iio.c:201
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)
int32_t(* post_disable)(void *dev)
Definition: iio_types.h:276
struct iio_ch_info * ch_info
Definition: iio.c:144
iio_attr_type
Definition: iiod.h:52
int iio_buffer_pop_scan(struct iio_buffer *buffer, void *data)
Definition: iio.c:1443
int channel2
Definition: iio_types.h:178
int(* close)(struct iiod_ctx *ctx, const char *device)
Definition: iiod.h:112
int32_t(* debug_reg_read)(void *dev, uint32_t reg, uint32_t *readval)
Definition: iio_types.h:283
int32_t iiod_conn_add(struct iiod_desc *desc, struct iiod_conn_data *data, uint32_t *new_conn_id)
Definition: iiod.c:393
void * instance
Definition: iiod.h:163
int iio_init(struct iio_desc **desc, struct iio_init_param *init_param)
Set communication ops and read/write ops.
Definition: iio.c:1890
bool ch_out
Definition: iio_types.h:188
char * trigger_id
Definition: iio.h:73
struct iio_local_backend * local_backend
Definition: iio.h:112
int64_t no_os_div_s64(int64_t dividend, int32_t divisor)
void * trig
Definition: iio.h:78
int32_t no_os_cb_end_async_write(struct no_os_circular_buffer *desc)
#define IIOD_PORT
Definition: iio.c:69
@ IIO_SHARED_BY_ALL
Definition: iio_types.h:122
struct iio_ctx_attr * ctx_attrs
Definition: iio.h:113
#define no_os_min(x, y)
Definition: no_os_util.h:59
struct no_os_uart_desc * uart_desc
Definition: iio.h:107
int channel
Definition: iio_types.h:174
int32_t(* pre_enable)(void *dev, uint32_t mask)
Definition: iio_types.h:274
Stucture holding the UART descriptor.
Definition: no_os_uart.h:134
@ USE_NETWORK
Definition: iio.h:55
enum iio_attribute_shared shared
Definition: iio_types.h:138
Links a physical trigger instance "void *instance" with a "iio_trigger *descriptor" that describes ca...
Definition: iio.c:191
const char * value
Definition: iio.h:90
uint8_t shift
Definition: iio_types.h:159
#define IIOD_MAX_CONNECTIONS
Definition: iiod.h:43
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
Definition: iio_types.h:91
const char * name
Definition: iio_types.h:131
bool allocated
Definition: iio.c:159
struct iio_dev_priv * devs
Definition: iio.c:212
int iio_buffer_block_done(struct iio_buffer *buffer)
Definition: iio.c:1422
char * xml
Definition: iiod.h:168
int(* refill_buffer)(struct iiod_ctx *ctx, const char *device)
Definition: iiod.h:118
const char * name
Definition: iio_types.h:170
struct iio_attribute * debug_attributes
Definition: iio_types.h:258
struct iiod_ops * ops
Definition: iiod.h:161
@ IIO_VAL_CHAR
Definition: iio_types.h:57
const char * name
Definition: iio.h:88
int32_t(* submit)(struct iio_device_data *dev)
Definition: iio_types.h:278
char * buf
Definition: iiod.h:82
int32_t iiod_init(struct iiod_desc **desc, struct iiod_init_param *param)
Definition: iiod.c:347
uint32_t size
Definition: iio_types.h:213
int(* write_buffer)(struct iiod_ctx *ctx, const char *device, const char *buf, uint32_t bytes)
Definition: iiod.h:121
struct iio_cyclic_buffer_info cyclic_info
Definition: iio_types.h:223
int iio_buffer_get_block(struct iio_buffer *buffer, void **addr)
Definition: iio.c:1409
struct iio_trigger * descriptor
Definition: iio.h:79
char * name
Definition: iio.h:61
@ IIO_ATTR_TYPE_DEVICE
Definition: iiod.h:57
int(* set_buffers_count)(struct iiod_ctx *ctx, const char *device, uint32_t buffers_count)
Definition: iiod.h:149
iio_buffer_direction
Definition: iio_types.h:199
Structure holding pointers to show and store functions.
Definition: iio_types.h:129
int(* get_trigger)(struct iiod_ctx *ctx, const char *device, char *trigger, uint32_t len)
Definition: iiod.h:136
void * conn
Definition: iiod.h:75
void iiod_remove(struct iiod_desc *desc)
Definition: iiod.c:376
uint32_t len
Definition: iio.c:143
struct no_os_uart_desc * uart_desc
Definition: iio.c:216
Definition: iio_types.h:209
#define REG_ACCESS_ATTRIBUTE
Definition: iio.c:71
bool initalized
Definition: iio.c:157
uint32_t active_mask
Definition: iio_types.h:211
int(* read_attr)(struct iiod_ctx *ctx, const char *device, struct iiod_attr *attr, char *buf, uint32_t len)
Definition: iiod.h:130
Circular buffer library header.
struct iio_device_init * devs
Definition: iio.h:115
struct no_os_circular_buffer * buf
Definition: iio_types.h:221
@ IIO_ATTR_TYPE_DEBUG
Definition: iiod.h:53
@ IIO_CURRENT
Definition: iio_types.h:66
int32_t iio_parse_value(char *buf, enum iio_val fmt, int32_t *val, int32_t *val2)
Definition: iio.c:630
@ IIO_WEIGHT
Definition: iio_types.h:81
@ IIO_MOD_YAW
Definition: iio_types.h:95
int(* recv)(void *conn, uint8_t *buf, uint32_t len)
Definition: iio.c:217
@ IIO_VOLTAGE
Definition: iio_types.h:65
uint32_t nb_ctx_attr
Definition: iio.h:114
@ IIO_ANGL
Definition: iio_types.h:76
#define IIOD_CONN_BUFFER_SIZE
Definition: iio.c:72
@ IIO_MOD_TEMP_AMBIENT
Definition: iio_types.h:93
struct iio_device_data dev_data
Definition: iio.c:175
#define NO_OS_TOSTRING(x)
Definition: iio.c:76
Links a physical device instance "void *dev_instance" with a "iio_device *iio" that describes capabil...
Definition: iio.c:167
char dev_id[MAX_DEV_ID]
Definition: iio.c:169
#define MAX_DEV_ID
Definition: iiod.h:47
uint32_t nb_ctx_attr
Definition: iio.c:211
struct iio_buffer * buffer
Definition: iio_types.h:228
iio_val
Definition: iio_types.h:49
struct iio_buffer_priv buffer
Definition: iio.c:181
uint32_t buff_index
Definition: iio_types.h:206
@ IIO_CAPACITANCE
Definition: iio_types.h:70
char * name
Definition: iio.h:77
@ IIO_DIRECTION_OUTPUT
Definition: iio_types.h:201
struct no_os_circular_buffer cb
Definition: iio.c:151
const char * name
Definition: iiod.h:67
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)
#define MAX_CHN_ID
Definition: iiod.h:49
int(* set_trigger)(struct iiod_ctx *ctx, const char *device, const char *trigger, uint32_t len)
Definition: iiod.h:142
struct iio_trigger_init * trigs
Definition: iio.h:117
int iio_format_value(char *buf, uint32_t len, enum iio_val fmt, int32_t size, int32_t *vals)
Definition: iio.c:686
int(* send)(void *conn, uint8_t *buf, uint32_t len)
Definition: iio.c:218
int32_t no_os_cb_init(struct no_os_circular_buffer **desc, uint32_t size)
int32_t no_os_cb_remove(struct no_os_circular_buffer *desc)
struct iio_attribute * buffer_attributes
Definition: iio_types.h:260
int(* read_buffer)(struct iiod_ctx *ctx, const char *device, char *buf, uint32_t bytes)
Definition: iiod.h:115
uint32_t nb_devs
Definition: iio.h:116
void * dev_instance
Definition: iio.c:173
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
char * buf
Definition: iio.c:142
struct iio_attribute * attributes
Definition: iio_types.h:186
Header file for iio_types.
uint16_t num_ch
Definition: iio_types.h:252
struct scan_type * scan_type
Definition: iio_types.h:184
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
Definition: iio_types.h:90
struct iio_device * dev_descriptor
Definition: iio.h:63
@ IIO_TEMP
Definition: iio_types.h:69
uint32_t active_reg_addr
Definition: iio.c:177
@ IIO_MOD_ROLL
Definition: iio_types.h:96
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
int32_t(* trigger_handler)(struct iio_device_data *dev)
Definition: iio_types.h:280
void * phy_desc
Definition: iio.c:207
enum iio_buffer_direction dir
Definition: iio_types.h:219
@ IIO_ATTR_TYPE_CH_IN
Definition: iiod.h:56
void * dev
Definition: iio.h:62
#define NULL
Definition: wrapper.h:64
Definition: iio_types.h:231
enum iio_attr_type type
Definition: iiod.h:61
int32_t no_os_cb_cfg(struct no_os_circular_buffer *desc, int8_t *buf, uint32_t size)
bool modified
Definition: iio_types.h:191
uint32_t nb_devs
Definition: iio.c:213
int scan_index
Definition: iio_types.h:182
uint32_t trig_idx
Definition: iio.c:183
@ IIO_ATTR_TYPE_CH_OUT
Definition: iiod.h:55
@ IIO_MAGN
Definition: iio_types.h:73
#define no_os_shift_right(x, s)
Definition: no_os_util.h:119
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
struct iio_trig_priv * trigs
Definition: iio.c:214
Structure holding channels and attributes of a device.
Definition: iio_types.h:247
int32_t no_os_cb_write(struct no_os_circular_buffer *desc, const void *data, uint32_t nb_elements)
uint32_t raw_buf_len
Definition: iio.h:71
@ IIO_INCLI
Definition: iio_types.h:74
int(* send)(struct iiod_ctx *ctx, uint8_t *buf, uint32_t len)
Definition: iiod.h:98
int(* write_attr)(struct iiod_ctx *ctx, const char *device, struct iiod_attr *attr, char *buf, uint32_t len)
Definition: iiod.h:133
bool is_cyclic
Definition: iio_types.h:205
Circular buffer descriptor.
Definition: no_os_circular_buffer.h:67
int(* push_buffer)(struct iiod_ctx *ctx, const char *device)
Definition: iiod.h:124
struct iio_attribute * attributes
Definition: iio_types.h:236
char id[MAX_TRIG_ID]
Definition: iio.c:193
int iio_step(struct iio_desc *desc)
Execute an iio step.
Definition: iio.c:1510
char * name
Definition: iio.c:195
uint32_t nb_trigs
Definition: iio.c:215
@ IIO_ROT
Definition: iio_types.h:77
int(* enable)(void *trig)
Definition: iio_types.h:238
#define NO_TRIGGER
Definition: iio.c:73
int32_t iiod_conn_step(struct iiod_desc *desc, uint32_t conn_id)
Definition: iiod.c:905
void * dev_instance
Definition: iio.c:141
@ IIO_ATTR_TYPE_BUFFER
Definition: iiod.h:54
Structure holding the context attribute members.
Definition: iio.h:86
struct no_os_circular_buffer * conns
Definition: iio.c:220
char * local_backend_buff
Definition: iio.h:100
Header file of UART interface.
bool is_synchronous
Definition: iio_types.h:234
@ IIO_DELTA_ANGL
Definition: iio_types.h:79
void * instance
Definition: iio.c:197
int(* local_backend_event_read)(void *conn, uint8_t *buf, uint32_t len)
Definition: iio.h:98
int(* local_backend_event_write)(void *conn, uint8_t *buf, uint32_t len)
Definition: iio.h:99
int iio_buffer_get_block(struct iio_buffer *buffer, void **addr)
Definition: iio.c:1409
Header file of utility functions.
int iio_format_value(char *buf, uint32_t len, enum iio_val fmt, int32_t size, int32_t *vals)
Definition: iio.c:686
Definition: iio_types.h:226
int32_t(* debug_reg_write)(void *dev, uint32_t reg, uint32_t writeval)
Definition: iio_types.h:285
@ IIO_VELOCITY
Definition: iio_types.h:75
uint32_t xml_size
Definition: iio.c:209
int32_t no_os_cb_size(struct no_os_circular_buffer *desc, uint32_t *size)
int8_t * raw_buf
Definition: iio.h:69
dev_id
Definition: ad9361.h:3328
int32_t no_os_cb_end_async_read(struct no_os_circular_buffer *desc)
int32_t iiod_conn_remove(struct iiod_desc *desc, uint32_t conn_id, struct iiod_conn_data *data)
Definition: iiod.c:423
int(* recv)(struct iiod_ctx *ctx, uint8_t *buf, uint32_t len)
Definition: iiod.h:99
@ IIO_SHARED_BY_DIR
Definition: iio_types.h:121
uint32_t raw_buf_len
Definition: iio.c:155
int iio_step(struct iio_desc *desc)
Execute an iio step.
Definition: iio.c:1510
unsigned long address
Definition: iio_types.h:180
physical_link_type
Definition: iio.h:52
int iio_buffer_push_scan(struct iio_buffer *buffer, void *data)
Definition: iio.c:1434
@ IIO_DELTA_VELOCITY
Definition: iio_types.h:80
struct iio_attribute * attributes
Definition: iio_types.h:256
#define NO_OS_DIV_ROUND_CLOSEST(x, y)
Definition: no_os_util.h:54
@ IIO_VAL_INT_MULTIPLE
Definition: iio_types.h:54
int32_t iio_parse_value(char *buf, enum iio_val fmt, int32_t *val, int32_t *val2)
Definition: iio.c:630
bool indexed
Definition: iio_types.h:194
@ USE_UART
Definition: iio.h:53
int32_t no_os_cb_read(struct no_os_circular_buffer *desc, void *data, uint32_t nb_elements)
struct iiod_ops iiod_ops
Definition: iio.c:206
uint8_t realbits
Definition: iio_types.h:155