no-OS
iio_app.h
Go to the documentation of this file.
1 /***************************************************************************/
40 #ifndef IIO_APP
41 #define IIO_APP
42 
43 #include "iio.h"
44 #include "no_os_irq.h"
45 
46 #define IIO_APP_DEVICE(_name, _dev, _dev_descriptor, _read_buff, _write_buff) {\
47  .name = _name,\
48  .dev = _dev,\
49  .dev_descriptor = _dev_descriptor,\
50  .read_buff = _read_buff,\
51  .write_buff = _write_buff\
52 }
53 
54 #define IIO_APP_TRIGGER(_name, _trig, _trig_descriptor) {\
55  .name = _name,\
56  .trig = _trig,\
57  .descriptor = _trig_descriptor,\
58 }
59 
61  uint32_t size;
62  void *buff;
63 };
64 
66  char *name;
67  void *dev;
71 };
72 
81 int32_t iio_app_run(struct iio_app_device *devices, uint32_t len);
82 
83 int32_t iio_app_run_with_trigs(struct iio_app_device *devices, uint32_t len,
84  struct iio_trigger_init *trigs, int32_t nb_trigs,
85  void *irq_desc, struct iio_desc **iio_desc);
86 #endif
UART_ONE_STOPBIT
@ UART_ONE_STOPBIT
Definition: uart_extra.h:134
no_os_uart_init_param::parity
enum no_os_uart_parity parity
Definition: no_os_uart.h:115
UART_BAUDRATE
#define UART_BAUDRATE
Definition: parameters.h:74
iio_init_param::phy_type
enum pysical_link_type phy_type
Definition: iio.h:90
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 data to UART. Blocking function.
Definition: no_os_uart.c:210
iio_init_param::nb_trigs
uint32_t nb_trigs
Definition: iio.h:100
iio_data_buffer::size
uint32_t size
Definition: iio_app.h:61
UART_IRQ_ID
#define UART_IRQ_ID
Definition: parameters.h:81
NO_OS_UART_STOP_1_BIT
@ NO_OS_UART_STOP_1_BIT
Definition: no_os_uart.h:94
no_os_irq.h
Header file of IRQ interface.
xil_uart_init_param::type
enum xil_uart_type type
Definition: uart_extra.h:75
no_os_uart_init_param::size
enum no_os_uart_size size
Definition: no_os_uart.h:113
iio_desc
Definition: iio.c:188
INTC_DEVICE_ID
#define INTC_DEVICE_ID
Definition: parameters.h:79
iio_app.h
Header file of iio_app.
xil_irq_ops
const struct no_os_irq_platform_ops xil_irq_ops
Xilinx specific IRQ platform ops structure.
Definition: xilinx_irq.c:378
iio_trigger_init
Definition: iio.h:83
iio_data_buffer::buff
void * buff
Definition: iio_app.h:62
no_os_delay.h
Header file of Delay functions.
xil_irq_init_param::type
enum xil_irq_type type
Definition: irq_extra.h:72
iio_app_device::name
char * name
Definition: iio_app.h:66
iio_init_param
Definition: iio.h:89
stm32_uart_init_param
Specific initialization parameters for stm32 UART.
Definition: stm32_uart.h:52
no_os_uart_remove
int32_t no_os_uart_remove(struct no_os_uart_desc *desc)
Free the resources allocated by no_os_uart_init().
Definition: no_os_uart.c:446
iio_init
int iio_init(struct iio_desc **desc, struct iio_init_param *init_param)
Set communication ops and read/write ops that will be called from "libtinyiiod".
Definition: iio.c:1743
no_os_mdelay
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: delay.c:132
iio_app_device::read_buff
struct iio_data_buffer * read_buff
Definition: iio_app.h:69
iio_init_param::uart_desc
struct no_os_uart_desc * uart_desc
Definition: iio.h:92
IIO_APP_HUART
#define IIO_APP_HUART
Definition: parameters.h:64
no_os_uart_desc
Stucture holding the UART descriptor.
Definition: no_os_uart.h:126
iio.h
Header file of iio.
no_os_error.h
Error codes definition.
no_os_irq_global_enable
int32_t no_os_irq_global_enable(struct no_os_irq_ctrl_desc *desc)
Enable global interrupts.
Definition: no_os_irq.c:107
stm32_uart.h
Header file of UART driver for STM32.
iio_app_device
Definition: iio_app.h:65
aducm_irq_ops
const struct no_os_irq_platform_ops aducm_irq_ops
Aducm3029 platform specific IRQ platform ops structure.
Definition: aducm3029_irq.c:538
stm32_irq.h
Header file for stm32 irq specifics.
iio_app_device::write_buff
struct iio_data_buffer * write_buff
Definition: iio_app.h:70
aducm_uart_init_param
Stores specific parameter needed to initialize the UART driver for the ADuCM3029 platform.
Definition: uart_extra.h:177
iio_device_init::name
char * name
Definition: iio.h:68
iio_data_buffer
Definition: iio_app.h:60
no_os_irq_init_param::irq_ctrl_id
uint32_t irq_ctrl_id
Definition: no_os_irq.h:105
UART_PS
@ UART_PS
Definition: uart_extra.h:65
stm32_irq_ops
const struct no_os_irq_platform_ops stm32_irq_ops
stm32 specific IRQ platform ops structure
Definition: stm32_irq.c:429
no_os_irq_ctrl_init
int32_t no_os_irq_ctrl_init(struct no_os_irq_ctrl_desc **desc, const struct no_os_irq_init_param *param)
Initialize the IRQ interrupts.
Definition: no_os_irq.c:51
iio_init_param::devs
struct iio_device_init * devs
Definition: iio.h:97
xil_uart_init_param
Structure holding the initialization parameters for Xilinx platform specific UART parameters.
Definition: uart_extra.h:73
max_uart_init_param
Aditional UART config parameters.
Definition: maxim_uart.h:59
UART_FLOW_DIS
@ UART_FLOW_DIS
Definition: maxim_uart.h:51
xil_uart_init_param::irq_desc
struct no_os_irq_ctrl_desc * irq_desc
Definition: uart_extra.h:79
no_os_uart_init_param::baud_rate
uint32_t baud_rate
Definition: no_os_uart.h:111
UART_DEVICE_ID
#define UART_DEVICE_ID
Definition: parameters.h:78
IRQ_PS
@ IRQ_PS
Definition: irq_extra.h:62
no_os_uart_init_param::stop
enum no_os_uart_stop stop
Definition: no_os_uart.h:117
UART_WORDLEN_8BITS
@ UART_WORDLEN_8BITS
Definition: uart_extra.h:108
UART_PL
@ UART_PL
Definition: uart_extra.h:63
irq_desc
Structure for Interrupt Request descriptor.
iio_init_param::trigs
struct iio_trigger_init * trigs
Definition: iio.h:99
iio_init_param::nb_devs
uint32_t nb_devs
Definition: iio.h:98
USE_UART
@ USE_UART
Definition: iio.h:59
iio_device_init::dev_descriptor
struct iio_device * dev_descriptor
Definition: iio.h:70
no_os_uart_init
int32_t no_os_uart_init(struct no_os_uart_desc **desc, struct no_os_uart_init_param *param)
Initialize the UART communication peripheral.
Definition: no_os_uart.c:334
iio_device_init::dev
void * dev
Definition: iio.h:69
NULL
#define NULL
Definition: wrapper.h:64
no_os_uart_init_param
Structure holding the parameters for UART initialization.
Definition: no_os_uart.h:103
iio_app_device::dev
void * dev
Definition: iio_app.h:67
iio_device
Structure holding channels and attributes of a device.
Definition: iio_types.h:242
iio_device_init::raw_buf_len
uint32_t raw_buf_len
Definition: iio.h:78
no_os_irq_init_param
Structure holding the initial parameters for Interrupt Request.
Definition: no_os_irq.h:103
NO_OS_UART_PAR_NO
@ NO_OS_UART_PAR_NO
Definition: no_os_uart.h:77
UART_NO_PARITY
@ UART_NO_PARITY
Definition: uart_extra.h:117
no_os_uart_init_param::device_id
uint8_t device_id
Definition: no_os_uart.h:105
iio_app_device::dev_descriptor
struct iio_device * dev_descriptor
Definition: iio_app.h:68
no_os_irq_platform_ops
Structure holding IRQ function pointers that point to the platform specific function.
Definition: no_os_irq.h:164
iio_app_run
int32_t iio_app_run(struct iio_app_device *devices, uint32_t len)
Register devices and start an iio application.
no_os_uart.h
Header file of UART interface.
max_irq_ops
const struct no_os_irq_platform_ops max_irq_ops
maxim platform specific irq platform ops structure
Definition: maxim_irq.c:570
iio_app_run_with_trigs
int32_t iio_app_run_with_trigs(struct iio_app_device *devices, uint32_t len, struct iio_trigger_init *trigs, int32_t nb_trigs, void *irq_desc, struct iio_desc **iio_desc)
iio_device_init
Definition: iio.h:67
iio_device_init::raw_buf
int8_t * raw_buf
Definition: iio.h:76
no_os_irq_ctrl_desc
Definition: no_os_irq.h:119
NO_OS_UART_CS_8
@ NO_OS_UART_CS_8
Definition: no_os_uart.h:66
iio_step
int iio_step(struct iio_desc *desc)
Execute an iio step.
Definition: iio.c:1395
errno.h
Error macro definition for ARM Compiler.
xil_irq_init_param
Structure holding the initialization parameters for Xilinx platform specific IRQ parameters.
Definition: irq_extra.h:70