25 #define MBED_PLATFORM 1
26 #define STM32_PLATFORM 2
29 #define CONTINUOUS_DATA_CAPTURE 0
30 #define BURST_DATA_CAPTURE 1
35 #define FAST_50HZ_TEST 2
38 #define BIPOLAR_MODE 0
39 #define UNIPOLAR_MODE 1
42 #define DIFFERENTIAL_INPUT 0
43 #define PSEUDO_DIFFERENTIAL_INPUT 1
46 #if !defined(ACTIVE_PLATFORM)
47 #define ACTIVE_PLATFORM MBED_PLATFORM
51 #if !defined(DATA_CAPTURE_MODE)
52 #define DATA_CAPTURE_MODE CONTINUOUS_DATA_CAPTURE
58 #if !defined(USE_PHY_COM_PORT)
59 #define USE_VIRTUAL_COM_PORT
64 #define STR(s) XSTR(s)
66 #if (ACTIVE_PLATFORM == MBED_PLATFORM)
68 #define HW_CARRIER_NAME TARGET_NAME
71 #define spi_extra_init_params mbed_spi_extra_init_params
72 #if defined(USE_VIRTUAL_COM_PORT)
73 #define uart_extra_init_params mbed_vcom_extra_init_params
74 #define uart_ops mbed_virtual_com_ops
76 #define uart_extra_init_params mbed_uart_extra_init_params
77 #define uart_ops mbed_uart_ops
79 #define i2c_extra_init_params mbed_i2c_extra_init_params
80 #define gpio_sync_init_params mbed_gpio_sync_extra_init_params
81 #define trigger_gpio_irq_extra_params mbed_trigger_gpio_irq_init_params
82 #define gpio_ops mbed_gpio_ops
83 #define irq_ops mbed_irq_ops
84 #define spi_ops mbed_spi_ops
85 #define i2c_ops mbed_i2c_ops
86 #define trigger_gpio_irq_ops mbed_gpio_irq_ops
87 #define trigger_gpio_handle 0
88 #define TRIGGER_INT_ID GPIO_IRQ_ID1
89 #elif (ACTIVE_PLATFORM == STM32_PLATFORM)
90 #include "app_config_stm32.h"
92 #define gpio_ops stm32_gpio_ops
93 #define spi_ops stm32_spi_ops
94 #define i2c_ops stm32_i2c_ops
95 #define uart_ops stm32_uart_ops
96 #define irq_platform_ops stm32_gpio_irq_ops
97 #define trigger_gpio_irq_ops stm32_gpio_irq_ops
98 #define TRIGGER_INT_ID RDY_PIN
99 #define trigger_gpio_handle 0
100 #define spi_extra_init_params stm32_spi_extra_init_params
101 #define uart_extra_init_params stm32_uart_extra_init_params
102 #define i2c_extra_init_params stm32_i2c_extra_init_params
103 #define trigger_gpio_irq_extra_params stm32_trigger_gpio_irq_init_params
104 #define gpio_sync_init_params stm32_gpio_sync_extra_init_params
106 #error "No/Invalid active platform selected"
117 #if defined(DEV_AD7190)
118 #define ACTIVE_DEVICE_NAME "ad7190"
119 #define DEVICE_NAME "DEV_AD7190"
120 #define HW_MEZZANINE_NAME "EVAL-AD7190-ASDZ"
121 #elif defined(DEV_AD7192)
122 #define ACTIVE_DEVICE_NAME "ad7192"
123 #define DEVICE_NAME "DEV_AD7192"
124 #define HW_MEZZANINE_NAME "EVAL-AD7192-ASDZ"
125 #elif defined(DEV_AD7193)
126 #define ACTIVE_DEVICE_NAME "ad7193"
127 #define DEVICE_NAME "DEV_AD7193"
128 #define HW_MEZZANINE_NAME "EVAL-AD7193-ASDZ"
129 #elif defined(DEV_AD7194)
130 #define ACTIVE_DEVICE_NAME "ad7194"
131 #define DEVICE_NAME "DEV_AD7194"
132 #define HW_MEZZANINE_NAME "EVAL-AD7194ASDZ"
133 #elif defined(DEV_AD7195)
134 #define ACTIVE_DEVICE_NAME "ad7195"
135 #define DEVICE_NAME "DEV_AD7195"
136 #define HW_MEZZANINE_NAME "EVAL-AD7195-ASDZ"
138 #warning No/Unsupported ADxxxxy symbol defined. AD7193 defined
140 #define ACTIVE_DEVICE_NAME "ad7193"
141 #define DEVICE_NAME "DEV_AD7193"
142 #define HW_MEZZANINE_NAME "EVAL-AD7193-ASDZ"
145 #if defined(DEV_AD7190) || defined(DEV_AD7192) || defined(DEV_AD7195)
146 #define NO_OF_CHANNELS 4
147 #elif defined(DEV_AD7194)
148 #define NO_OF_CHANNELS 16
150 #define NO_OF_CHANNELS 8
152 #define ADC_RESOLUTION 24
155 #if !defined(ACTIVE_MODE)
156 #define ACTIVE_MODE NORMAL_MODE
173 #if (ACTIVE_MODE == NORMAL_MODE)
174 #define POLARITY_CONFIG UNIPOLAR_MODE
176 #define POLARITY_CONFIG BIPOLAR_MODE
197 #if (ACTIVE_MODE == NORMAL_MODE)
198 #define INPUT_CONFIG PSEUDO_DIFFERENTIAL_INPUT
200 #define INPUT_CONFIG DIFFERENTIAL_INPUT
204 #define ADC_MAX_COUNT_UNIPOLAR (uint32_t)((1 << ADC_RESOLUTION) - 1)
207 #define ADC_MAX_COUNT_BIPOLAR (uint32_t)(1 << (ADC_RESOLUTION-1))
210 #define IIO_UART_BAUD_RATE (230400)
213 #define FIRMWARE_NAME "ad719x_iio"
216 #if !defined(PLATFORM_NAME)
217 #define PLATFORM_NAME HW_CARRIER_NAME
223 #define VIRTUAL_COM_PORT_VID 0x0456
224 #define VIRTUAL_COM_PORT_PID 0xb66c
226 #define VIRTUAL_COM_SERIAL_NUM (FIRMWARE_NAME "_" DEVICE_NAME "_" STR(PLATFORM_NAME))
238 extern struct no_os_uart_desc *
uart_desc;
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_desc
Definition: app_config.c:97
struct no_os_eeprom_desc * eeprom_desc
Definition: app_config.c:194
void burst_capture_callback(void *context)
Interrupt Service Routine to monitor end of conversion event.
Definition: ad469x_iio.c:1033
Header file for Mbed platform configurations.