no-OS
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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#define IIO_APP_DEVICE(_name, _dev, _dev_descriptor, _read_buff, _write_buff, _default_trigger_id) {\
48 .name = _name,\
49 .dev = _dev,\
50 .dev_descriptor = _dev_descriptor,\
51 .read_buff = _read_buff,\
52 .write_buff = _write_buff,\
53 .default_trigger_id = _default_trigger_id\
54}
55
56#define IIO_APP_TRIGGER(_name, _trig, _trig_descriptor) {\
57 .name = _name,\
58 .trig = _trig,\
59 .descriptor = _trig_descriptor,\
60}
61
63 uint32_t size;
64 void *buff;
65};
66
75
84 void *irq_desc;
88 int (*post_step_callback)(void *arg);
90 void *arg;
91
92#ifdef NO_OS_LWIP_NETWORKING
93 struct lwip_network_desc *lwip_desc;
94#endif
95};
96
105 uint32_t nb_ctx_attr;
109 uint32_t nb_devices;
113 int32_t nb_trigs;
117 void *irq_desc;
119 int (*post_step_callback)(void *arg);
121 void *arg;
122
123#ifdef NO_OS_LWIP_NETWORKING
124 struct lwip_network_param lwip_param;
125#endif
126};
127
129int iio_app_init(struct iio_app_desc **app,
130 struct iio_app_init_param app_init_param);
131
133int iio_app_run(struct iio_app_desc *app);
134
137
138#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:80
struct no_os_uart_desc * uart_desc
Definition iio_app.h:82
void * arg
Definition iio_app.h:90
void * irq_desc
Definition iio_app.h:84
struct iio_desc * iio_desc
Definition iio_app.h:86
int(* post_step_callback)(void *arg)
Definition iio_app.h:88
Definition iio_app.h:67
struct iio_device * dev_descriptor
Definition iio_app.h:70
char * name
Definition iio_app.h:68
void * dev
Definition iio_app.h:69
char * default_trigger_id
Definition iio_app.h:73
struct iio_data_buffer * write_buff
Definition iio_app.h:72
struct iio_data_buffer * read_buff
Definition iio_app.h:71
IIO application descriptor initialization parameters.
Definition iio_app.h:101
uint32_t nb_ctx_attr
Definition iio_app.h:105
int(* post_step_callback)(void *arg)
Definition iio_app.h:119
int32_t nb_trigs
Definition iio_app.h:113
struct iio_trigger_init * trigs
Definition iio_app.h:111
struct no_os_uart_init_param uart_init_params
Definition iio_app.h:115
void * irq_desc
Definition iio_app.h:117
uint32_t nb_devices
Definition iio_app.h:109
struct iio_app_device * devices
Definition iio_app.h:107
void * arg
Definition iio_app.h:121
struct iio_ctx_attr * ctx_attrs
Definition iio_app.h:103
Structure holding the context attribute members.
Definition iio.h:78
Definition iio_app.h:62
void * buff
Definition iio_app.h:64
uint32_t size
Definition iio_app.h:63
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