no-OS
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
common_data.h
Go to the documentation of this file.
1/***************************************************************************/
33#ifndef __COMMON_DATA_H__
34#define __COMMON_DATA_H__
35
36#include "platform_includes.h"
37#include "app_config.h"
38#include "no_os_util.h"
39#include "adc_demo.h"
40#include "dac_demo.h"
41#if defined(IIO_SW_TRIGGER_EXAMPLE) || defined(IIO_TIMER_TRIGGER_EXAMPLE)
42#include "iio_trigger.h"
43#endif
44
46
47#define DEMO_CHANNELS no_os_max(TOTAL_ADC_CHANNELS, TOTAL_DAC_CHANNELS)
48
49#ifdef ENABLE_LOOPBACK
50#define SAMPLES_PER_CHANNEL SAMPLES_PER_CHANNEL_PLATFORM
51#else //ENABLE_LOOPBACK
52#define SAMPLES_PER_CHANNEL 0
53#define loopback_buffs NULL
54#endif //ENABLE_LOOPBACK
55
56extern uint8_t in_buff[];
57extern uint8_t out_buff[];
58
59#define MAX_SIZE_BASE_ADDR (SAMPLES_PER_CHANNEL * DEMO_CHANNELS * \
60 sizeof(uint16_t))
61
62#define DAC_DDR_BASEADDR out_buff
63#define ADC_DDR_BASEADDR in_buff
64
67
68#ifdef IIO_SW_TRIGGER_EXAMPLE
69#define ADC_DEMO_TRIG_NAME "adc-demo-sw-trig"
70extern struct iio_sw_trig_init_param adc_trig_ip;
71
72#define DAC_DEMO_TRIG_NAME "dac-demo-sw-trig"
73extern struct iio_sw_trig_init_param dac_trig_ip;
74#endif
75
76#ifdef IIO_TIMER_TRIGGER_EXAMPLE
77#define ADC_DEMO_TIMER_TRIG_NAME "adc_demo_timer_trig"
78extern struct no_os_timer_init_param adc_demo_tip;
79extern struct no_os_irq_init_param adc_demo_timer_irq_ip;
80extern struct iio_hw_trig_init_param adc_demo_timer_trig_ip;
81
82#define DAC_DEMO_TIMER_TRIG_NAME "dac_demo_timer_trig"
83extern struct no_os_timer_init_param dac_demo_tip;
84extern struct no_os_irq_init_param dac_demo_timer_irq_ip;
85extern struct iio_hw_trig_init_param dac_demo_timer_trig_ip;
86#endif
87
88#endif /* __COMMON_DATA_H__ */
Header file of ADC Demo Driver.
Header file of DAC Demo Driver.
Config file of IIO Demo project.
struct adc_demo_init_param adc_init_par
Definition common_data.c:52
struct dac_demo_init_param dac_init_par
Definition common_data.c:62
struct no_os_uart_init_param iio_demo_uart_ip
Definition common_data.c:40
Header file for iio_trigger.
Header file of utility functions.
Definition adc_demo.h:70
Definition dac_demo.h:69
IIO hardware trigger initialization structure.
Definition iio_trigger.h:77
IIO software trigger initialization structure.
Definition iio_trigger.h:107
Structure holding the initial parameters for Interrupt Request.
Definition no_os_irq.h:101
Structure holding the parameters for timer initialization.
Definition no_os_timer.h:71
Structure holding the parameters for UART initialization.
Definition no_os_uart.h:98