no-OS
Loading...
Searching...
No Matches
iio_app.h
Go to the documentation of this file.
1/***************************************************************************/
33
34#ifndef IIO_APP
35#define IIO_APP
36
37#include "iio.h"
38#include "no_os_irq.h"
39#include "no_os_uart.h"
40#include "no_os_error.h"
41#include "no_os_delay.h"
42
43#if defined(NO_OS_LWIP_NETWORKING)
44#include "lwip_socket.h"
45#endif
46
47#if defined(NO_OS_W5500_NETWORKING)
48#include "tcp_socket.h"
49#include "w5500_network.h"
50#endif
51
52#define IIO_APP_DEVICE(_name, _dev, _dev_descriptor, _read_buff, _write_buff, _default_trigger_id) {\
53 .name = _name,\
54 .dev = _dev,\
55 .dev_descriptor = _dev_descriptor,\
56 .read_buff = _read_buff,\
57 .write_buff = _write_buff,\
58 .default_trigger_id = _default_trigger_id\
59}
60
61#define IIO_APP_TRIGGER(_name, _trig, _trig_descriptor) {\
62 .name = _name,\
63 .trig = _trig,\
64 .descriptor = _trig_descriptor,\
65}
66
68 uint32_t size;
69 void *buff;
70};
71
80
89 void *irq_desc;
93 int (*post_step_callback)(void *arg);
95 void *arg;
96
97#ifdef NO_OS_LWIP_NETWORKING
98 struct lwip_network_desc *lwip_desc;
99#endif
100};
101
110 uint32_t nb_ctx_attr;
114 uint32_t nb_devices;
118 int32_t nb_trigs;
122 void *irq_desc;
124 int (*post_step_callback)(void *arg);
126 void *arg;
127
128#ifdef NO_OS_LWIP_NETWORKING
129 struct lwip_network_param lwip_param;
130#endif
131
132#ifdef NO_OS_W5500_NETWORKING
133 struct w5500_network_dev *net_dev;
134#endif
135};
136
138int iio_app_init(struct iio_app_desc **app,
139 struct iio_app_init_param app_init_param);
140
142int iio_app_run(struct iio_app_desc *app);
143
146
147#endif
Header file of iio.
int iio_app_remove(struct iio_app_desc *app)
int iio_app_run(struct iio_app_desc *app)
int iio_app_init(struct iio_app_desc **app, struct iio_app_init_param app_init_param)
Header file of Delay functions.
Error codes definition.
Header file of IRQ interface.
Header file of UART interface.
IIO application descriptor.
Definition iio_app.h:85
struct no_os_uart_desc * uart_desc
Definition iio_app.h:87
void * arg
Definition iio_app.h:95
void * irq_desc
Definition iio_app.h:89
struct iio_desc * iio_desc
Definition iio_app.h:91
int(* post_step_callback)(void *arg)
Definition iio_app.h:93
Definition iio_app.h:72
struct iio_device * dev_descriptor
Definition iio_app.h:75
char * name
Definition iio_app.h:73
void * dev
Definition iio_app.h:74
char * default_trigger_id
Definition iio_app.h:78
struct iio_data_buffer * write_buff
Definition iio_app.h:77
struct iio_data_buffer * read_buff
Definition iio_app.h:76
IIO application descriptor initialization parameters.
Definition iio_app.h:106
uint32_t nb_ctx_attr
Definition iio_app.h:110
int(* post_step_callback)(void *arg)
Definition iio_app.h:124
int32_t nb_trigs
Definition iio_app.h:118
struct iio_trigger_init * trigs
Definition iio_app.h:116
struct no_os_uart_init_param uart_init_params
Definition iio_app.h:120
void * irq_desc
Definition iio_app.h:122
uint32_t nb_devices
Definition iio_app.h:114
struct iio_app_device * devices
Definition iio_app.h:112
void * arg
Definition iio_app.h:126
struct iio_ctx_attr * ctx_attrs
Definition iio_app.h:108
Structure holding the context attribute members.
Definition iio.h:78
Definition iio_app.h:67
void * buff
Definition iio_app.h:69
uint32_t size
Definition iio_app.h:68
Structure holding channels and attributes of a device.
Definition iio_types.h:238
Definition iio.h:68
Stucture holding the UART descriptor.
Definition no_os_uart.h:122
Structure holding the parameters for UART initialization.
Definition no_os_uart.h:98