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 
45 #define IIO_APP_DEVICE(_name, _dev, _dev_descriptor, _read_buff, _write_buff) {\
46  .name = _name,\
47  .dev = _dev,\
48  .dev_descriptor = _dev_descriptor,\
49  .read_buff = _read_buff,\
50  .write_buff = _write_buff\
51 }
52 
54  uint32_t size;
55  void *buff;
56 };
57 
59  char *name;
60  void *dev;
64 };
65 
74 int32_t iio_app_run(struct iio_app_device *devices, int32_t len);
75 
76 #endif
uart_init_param::parity
enum uart_parity parity
Definition: uart.h:109
UART_ONE_STOPBIT
@ UART_ONE_STOPBIT
Definition: uart_extra.h:129
iio_init_param::phy_type
enum pysical_link_type phy_type
Definition: iio.h:82
iio_app_run
int32_t iio_app_run(struct iio_app_device *devices, int32_t len)
Register devices and start an iio application.
irq_ctrl_desc
Definition: irq.h:98
iio_data_buffer::size
uint32_t size
Definition: iio_app.h:54
mdelay
void mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: delay.c:129
xil_uart_init_param::type
enum xil_uart_type type
Definition: uart_extra.h:75
UART_STOP_1_BIT
@ UART_STOP_1_BIT
Definition: uart.h:92
iio_desc
Definition: iio.c:164
uart_remove
int32_t uart_remove(struct uart_desc *desc)
Free the resources allocated by uart_init()
Definition: uart.c:509
iio_app.h
Header file of iio_app.
iio_data_buffer::buff
void * buff
Definition: iio_app.h:55
aducm_irq_ops
const struct irq_platform_ops aducm_irq_ops
Aducm3029 platform specific IRQ platform ops structure.
Definition: aducm3029_irq.c:468
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:59
UART_IRQ_ID
#define UART_IRQ_ID
Definition: parameters.h:61
iio_init_param
Definition: iio.h:81
xil_irq_ops
const struct irq_platform_ops xil_irq_ops
Xilinx specific IRQ platform ops structure.
Definition: xilinx_irq.c:374
UART_CS_8
@ UART_CS_8
Definition: uart.h:64
stm32_uart_init_param
Specific initialization parameters for stm32 UART.
Definition: stm32_uart.h:51
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:1362
iio_app_device::read_buff
struct iio_data_buffer * read_buff
Definition: iio_app.h:62
iio.h
Header file of iio.
uart_init_param::device_id
uint8_t device_id
Definition: uart.h:103
UART_PAR_NO
@ UART_PAR_NO
Definition: uart.h:75
uart.h
Header file of UART interface.
stm32_uart.h
Header file of UART driver for STM32.
iio_app_device
Definition: iio_app.h:58
iio_init_param::nb_devs
int32_t nb_devs
Definition: iio.h:90
irq_global_enable
int32_t irq_global_enable(struct irq_ctrl_desc *desc)
Enable global interrupts.
Definition: irq.c:103
iio_app_device::write_buff
struct iio_data_buffer * write_buff
Definition: iio_app.h:63
aducm_uart_init_param
Stores specific parameter needed to initialize the UART driver for the ADuCM3029 platform.
Definition: uart_extra.h:172
iio_device_init::name
char * name
Definition: iio.h:68
iio_data_buffer
Definition: iio_app.h:53
uart_init_param::stop
enum uart_stop stop
Definition: uart.h:111
UART_PS
@ UART_PS
Definition: uart_extra.h:65
error.h
Error codes definition.
irq_platform_ops
Structure holding IRQ function pointers that point to the platform specific function.
Definition: irq.h:130
uart_init_param::size
enum uart_size size
Definition: uart.h:107
iio_init_param::devs
struct iio_device_init * devs
Definition: iio.h:89
xil_uart_init_param
Structure holding the initialization parameters for Xilinx platform specific UART parameters.
Definition: uart_extra.h:73
delay.h
Header file of Delay functions.
uart_init
int32_t uart_init(struct uart_desc **desc, struct uart_init_param *param)
Initialize the UART communication peripheral.
Definition: uart.c:441
iio_init_param::uart_desc
struct uart_desc * uart_desc
Definition: iio.h:84
IRQ_PS
@ IRQ_PS
Definition: irq_extra.h:62
UART_WORDLEN_8BITS
@ UART_WORDLEN_8BITS
Definition: uart_extra.h:103
UART_PL
@ UART_PL
Definition: uart_extra.h:63
irq_desc
Structure for Interrupt Request descriptor.
xil_uart_init_param::irq_desc
struct irq_ctrl_desc * irq_desc
Definition: uart_extra.h:79
irq.h
Header file of IRQ interface.
uart_desc
Stucture holding the UART descriptor.
Definition: uart.h:120
USE_UART
@ USE_UART
Definition: iio.h:59
iio_device_init::dev_descriptor
struct iio_device * dev_descriptor
Definition: iio.h:70
iio_device_init::dev
void * dev
Definition: iio.h:69
NULL
#define NULL
Definition: wrapper.h:64
iio_app_device::dev
void * dev
Definition: iio_app.h:60
iio_device
Structure holding channels and attributes of a device.
Definition: iio_types.h:217
irq_init_param::irq_ctrl_id
uint32_t irq_ctrl_id
Definition: irq.h:87
iio_device_init::raw_buf_len
uint32_t raw_buf_len
Definition: iio.h:78
UART_NO_PARITY
@ UART_NO_PARITY
Definition: uart_extra.h:112
uart_stop
uart_stop
UART number of stop bits options.
Definition: uart.h:90
iio_app_device::dev_descriptor
struct iio_device * dev_descriptor
Definition: iio_app.h:61
uart_init_param
Structure holding the parameters for UART initialization.
Definition: uart.h:101
irq_ctrl_init
int32_t irq_ctrl_init(struct irq_ctrl_desc **desc, const struct irq_init_param *param)
Initialize the IRQ interrupts.
Definition: irq.c:51
uart_init_param::baud_rate
uint32_t baud_rate
Definition: uart.h:105
INTC_DEVICE_ID
#define INTC_DEVICE_ID
Definition: parameters.h:63
UART_BAUDRATE
#define UART_BAUDRATE
Definition: parameters.h:62
iio_device_init
Definition: iio.h:67
uart_write
int32_t uart_write(struct uart_desc *desc, const uint8_t *data, uint32_t bytes_number)
Write data to UART. Blocking function.
Definition: uart.c:318
iio_device_init::raw_buf
int8_t * raw_buf
Definition: iio.h:76
uart_parity
uart_parity
UART parity options.
Definition: uart.h:73
iio_step
int iio_step(struct iio_desc *desc)
Execute an iio step.
Definition: iio.c:1074
UART_DEVICE_ID
#define UART_DEVICE_ID
Definition: parameters.h:60
xil_irq_init_param
Structure holding the initialization parameters for Xilinx platform specific IRQ parameters.
Definition: irq_extra.h:70
irq_init_param
Structure holding the initial parameters for Interrupt Request.
Definition: irq.h:85