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
105 #error "No/Invalid active platform selected"
117 #if defined(DEV_AD4696)
118 #define ACTIVE_DEVICE ID_AD4696
119 #define ACTIVE_DEVICE_NAME "ad4696"
120 #define HW_MEZZANINE_NAME "EVAL-AD4696-ARDZ"
121 #define NO_OF_CHANNELS 16
123 #warning No/Unsupported ADxxxxy symbol defined. AD4696 defined
125 #define ACTIVE_DEVICE ID_AD4696
126 #define ACTIVE_DEVICE_NAME "ad4696"
127 #define HW_MEZZANINE_NAME "EVAL-AD4696-ARDZ"
128 #define NO_OF_CHANNELS 16
131 #define ADC_RESOLUTION 16
144 #define DEFAULT_POLARITY_MODE PSEUDO_BIPOLAR_MODE
147 #define ADC_MAX_COUNT_UNIPOLAR (uint32_t)((1 << ADC_RESOLUTION) - 1)
150 #define ADC_MAX_COUNT_BIPOLAR (uint32_t)(1 << (ADC_RESOLUTION-1))
153 #define IIO_UART_BAUD_RATE (230400)
156 #if !defined(DEVICE_NAME)
157 #define DEVICE_NAME "DEV_AD4696"
161 #define FIRMWARE_NAME "ad469x_iio"
163 #if !defined(PLATFORM_NAME)
164 #define PLATFORM_NAME HW_CARRIER_NAME
170 #define VIRTUAL_COM_PORT_VID 0x0456
171 #define VIRTUAL_COM_PORT_PID 0xb66c
173 #define VIRTUAL_COM_SERIAL_NUM (FIRMWARE_NAME "_" DEVICE_NAME "_" STR(PLATFORM_NAME))
176 #define IIO_UART_BAUD_RATE (230400)
179 #if defined(USE_PHY_COM_PORT)
181 #if (ACTIVE_PLATFORM == MBED_PLATFORM)
182 #define CONSOLE_STDIO_PORT_AVAILABLE
186 #define CONSOLE_STDIO_PORT_AVAILABLE
199 #define BYTES_PER_SAMPLE sizeof(uint16_t)
202 #define CHN_STORAGE_BITS (BYTES_PER_SAMPLE * 8)
212 extern struct no_os_pwm_desc *
pwm_desc;
215 #if (INTERFACE_MODE == SPI_DMA)
217 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 * pwm_desc
Definition: app_config.c:106
struct no_os_gpio_init_param cs_pwm_gpio_params
Definition: app_config.h:234
struct no_os_pwm_init_param cs_init_params
Definition: app_config.c:133
volatile uint32_t * buff_start_addr
Definition: ad405x_iio.c:174
int32_t data_read
Definition: ad405x_iio.c:337
struct no_os_gpio_init_param pwm_gpio_params
Definition: app_config.h:235
int32_t init_pwm(void)
Initialize the PWM interface.
Definition: app_config.c:283
void burst_capture_callback(void *context)
Interrupt Service Routine to monitor end of conversion event.
Definition: ad469x_iio.c:1033
uint32_t global_nb_of_samples
Definition: ad469x_iio.c:278
volatile struct iio_device_data * global_iio_dev_data
Definition: ad469x_iio.c:275
Header file for Mbed platform configurations.