28 #define MBED_PLATFORM 0
29 #define STM32_PLATFORM 1
32 #define CONTINUOUS_DATA_CAPTURE 0
33 #define BURST_DATA_CAPTURE 1
36 #define UNIPOLAR_MODE 0
37 #define PSEUDO_BIPOLAR_MODE 1
41 #define SPI_INTERRUPT 1
44 #if !defined(DATA_CAPTURE_MODE)
45 #define DATA_CAPTURE_MODE CONTINUOUS_DATA_CAPTURE
49 #if !defined(ACTIVE_PLATFORM)
50 #define ACTIVE_PLATFORM MBED_PLATFORM
56 #if !defined(INTERFACE_MODE)
57 #if (ACTIVE_PLATFORM == STM32_PLATFORM)
58 #define INTERFACE_MODE SPI_DMA
60 #define INTERFACE_MODE SPI_INTERRUPT
67 #if !defined(USE_PHY_COM_PORT)
68 #define USE_VIRTUAL_COM_PORT
73 #define STR(s) XSTR(s)
75 #if (ACTIVE_PLATFORM == MBED_PLATFORM)
77 #define HW_CARRIER_NAME TARGET_NAME
78 #define uart_extra_init_params mbed_uart_extra_init_params
79 #define vcom_extra_init_params mbed_vcom_extra_init_params
80 #define bsy_extra_init_params mbed_gpio_bsy_extra_init_params
81 #define cnv_extra_init_params mbed_gpio_cnv_extra_init_params
82 #define reset_extra_init_params mbed_gpio_reset_extra_init_params
83 #define trigger_gpio_irq_extra_params mbed_trigger_gpio_irq_init_params
84 #define spi_extra_init_params mbed_spi_extra_init_params
85 #define pwm_extra_init_params mbed_pwm_extra_init_params
86 #define i2c_extra_init_params mbed_i2c_extra_init_params
88 #elif (ACTIVE_PLATFORM == STM32_PLATFORM)
89 #include "app_config_stm32.h"
90 #define HW_CARRIER_NAME TARGET_NAME
92 #define uart_extra_init_params stm32_uart_extra_init_params
93 #define spi_extra_init_params stm32_spi_extra_init_params
94 #define cnv_extra_init_params stm32_gpio_cnv_extra_init_params
95 #define pwm_extra_init_params stm32_pwm_cnv_extra_init_params
96 #define pwm_gpio_extra_init_params stm32_pwm_gpio_extra_init_params
97 #define bsy_extra_init_params stm32_gpio_gp0_extra_init_params
98 #define gp1_extra_init_params stm32_gpio_gp1_extra_init_params
99 #define trigger_gpio_irq_extra_params stm32_gpio_irq_extra_init_params
100 #define reset_extra_init_params stm32_gpio_reset_extra_init_params
101 #define cs_extra_init_params stm32_cs_extra_init_params
102 #define tx_trigger_extra_init_params stm32_tx_trigger_extra_init_params
103 #define cs_pwm_gpio_extra_init_params stm32_cs_pwm_gpio_extra_init_params
104 #define vcom_extra_init_params stm32_vcom_extra_init_params
106 #error "No/Invalid active platform selected"
118 #if defined(DEV_AD4696)
119 #define ACTIVE_DEVICE ID_AD4696
120 #define ACTIVE_DEVICE_NAME "ad4696"
121 #define HW_MEZZANINE_NAME "EVAL-AD4696-ARDZ"
122 #define NO_OF_CHANNELS 16
124 #warning No/Unsupported ADxxxxy symbol defined. AD4696 defined
126 #define ACTIVE_DEVICE ID_AD4696
127 #define ACTIVE_DEVICE_NAME "ad4696"
128 #define HW_MEZZANINE_NAME "EVAL-AD4696-ARDZ"
129 #define NO_OF_CHANNELS 16
132 #define ADC_RESOLUTION 16
139 #define DEFAULT_POLARITY_MODE UNIPOLAR_MODE
142 #define ADC_MAX_COUNT_UNIPOLAR (uint32_t)((1 << ADC_RESOLUTION) - 1)
145 #define ADC_MAX_COUNT_BIPOLAR (uint32_t)(1 << (ADC_RESOLUTION-1))
148 #define IIO_UART_BAUD_RATE (230400)
151 #if !defined(DEVICE_NAME)
152 #define DEVICE_NAME "DEV_AD4696"
156 #define FIRMWARE_NAME "ad469x_iio"
158 #if !defined(PLATFORM_NAME)
159 #define PLATFORM_NAME HW_CARRIER_NAME
165 #define VIRTUAL_COM_PORT_VID 0x0456
166 #define VIRTUAL_COM_PORT_PID 0xb66c
168 #define VIRTUAL_COM_SERIAL_NUM (FIRMWARE_NAME "_" DEVICE_NAME "_" STR(PLATFORM_NAME))
171 #define IIO_UART_BAUD_RATE (230400)
174 #if defined(USE_PHY_COM_PORT)
176 #if (ACTIVE_PLATFORM == MBED_PLATFORM)
177 #define CONSOLE_STDIO_PORT_AVAILABLE
181 #define CONSOLE_STDIO_PORT_AVAILABLE
194 #define BYTES_PER_SAMPLE sizeof(uint16_t)
197 #define CHN_STORAGE_BITS (BYTES_PER_SAMPLE * 8)
207 extern struct no_os_pwm_desc *
pwm_desc;
210 #if (INTERFACE_MODE == SPI_DMA)
212 extern struct no_os_dma_init_param ad469x_dma_init_param;
struct no_os_irq_ctrl_desc * trigger_irq_desc
Definition: app_config.c:103
int32_t init_system(void)
Initialize the system peripherals.
Definition: app_config.c:185
struct no_os_uart_desc * uart_iio_com_desc
Definition: app_config.c:127
struct no_os_pwm_init_param pwm_init_params
Definition: app_config.c:108
struct no_os_eeprom_desc * eeprom_desc
Definition: app_config.c:194
struct no_os_pwm_desc * tx_trigger_desc
Definition: app_config.c:202
struct no_os_pwm_desc * pwm_desc
Definition: app_config.c:106
struct no_os_gpio_init_param cs_pwm_gpio_params
Definition: app_config.h:180
struct no_os_pwm_init_param cs_init_params
Definition: app_config.c:133
volatile uint32_t * buff_start_addr
Definition: ad405x_iio.c:169
int32_t data_read
Definition: ad405x_iio.c:328
struct no_os_gpio_init_param pwm_gpio_params
Definition: app_config.h:181
int32_t init_pwm(void)
Initialize the PWM interface.
Definition: app_config.c:287
void burst_capture_callback(void *context)
Interrupt Service Routine to monitor end of conversion event.
Definition: ad469x_iio.c:1037
uint32_t global_nb_of_samples
Definition: ad469x_iio.c:284
volatile struct iio_device_data * global_iio_dev_data
Definition: ad469x_iio.c:281
Header file for Mbed platform configurations.