33#define USER_DEFAULT_CONFIG 0
34#define RTD_2WIRE_CONFIG 1
35#define RTD_3WIRE_CONFIG 2
36#define RTD_4WIRE_CONFIG 3
37#define THERMISTOR_CONFIG 4
38#define THERMOCOUPLE_CONFIG 5
39#define ACCELEROMETER_CONFIG 6
40#define LOADCELL_CONFIG 7
43#define CONTINUOUS_DATA_CAPTURE 0
44#define BURST_DATA_CAPTURE 1
48#define SPI_INTERRUPT_MODE 1
55#define IIO_CLIENT_REMOTE 1
56#define IIO_CLIENT_LOCAL 2
65#if defined(DEV_AD4170)
66#define ACTIVE_DEVICE_NAME "ad4170"
67#define DEVICE_NAME "DEV_AD4170"
68#define ACTIVE_DEVICE_ID ID_AD4170
69#define HW_MEZZANINE_NAME "EVAL-AD4170-4ARDZ"
70#elif defined (DEV_AD4190)
71#define ACTIVE_DEVICE_NAME "ad4190"
72#define DEVICE_NAME "DEV_AD4190"
73#define ACTIVE_DEVICE_ID ID_AD4190
74#define HW_MEZZANINE_NAME "EVAL-AD4190-4ARDZ"
76#warning No/Unsupported ADxxxxy symbol defined. AD4170 defined
78#define ACTIVE_DEVICE_NAME "ad4170"
79#define DEVICE_NAME "DEV_AD4170"
80#define ACTIVE_DEVICE_ID ID_AD4170
81#define HW_MEZZANINE_NAME "EVAL-AD4170-4ARDZ"
95#define FS_SINC5_AVG_24_KSPS 20
98#define FS_SINC5_512_KSPS 1
101#define FS_SINC3_62P5_KSPS 4
104#if !defined(ACTIVE_PLATFORM)
105#define ACTIVE_PLATFORM STM32_PLATFORM
109#if !defined(ACTIVE_IIO_CLIENT)
110#define ACTIVE_IIO_CLIENT IIO_CLIENT_REMOTE
115#if !defined(INTERFACE_MODE)
117#if defined (TARGET_SDP_K1)
118#define INTERFACE_MODE SPI_DMA_MODE
119#elif defined(NUCLEO_H563)
120#define INTERFACE_MODE TDM_MODE
122#define INTERFACE_MODE SPI_INTERRUPT_MODE
127#if !defined(ACTIVE_DEMO_MODE_CONFIG)
128#define ACTIVE_DEMO_MODE_CONFIG USER_DEFAULT_CONFIG
132#if !defined(DATA_CAPTURE_MODE)
133#define DATA_CAPTURE_MODE BURST_DATA_CAPTURE
139#if !defined(USE_PHY_COM_PORT)
140#define USE_VIRTUAL_COM_PORT
143#if (ACTIVE_PLATFORM == STM32_PLATFORM)
146#define spi_extra_init_params stm32_spi_extra_init_params
147#define uart_extra_init_params stm32_uart_extra_init_params
148#define trigger_gpio_extra_init_params stm32_trigger_gpio_extra_init_params
149#define trigger_gpio_irq_extra_params stm32_trigger_gpio_irq_init_params
150#define gpio_dig_aux1_extra_init_params stm32_dig_aux1_gpio_extra_init_params
151#define gpio_dig_aux2_extra_init_params stm32_dig_aux2_gpio_extra_init_params
152#define gpio_sync_inb_extra_init_params stm32_sync_inb_gpio_extra_init_params
153#define csb_gpio_extra_init_params stm32_csb_gpio_extra_init_params
154#define ticker_int_extra_init_params stm32_ticket_int_init_params
155#define tdm_extra_init_params stm32_tdm_extra_init_params
156#define i2c_extra_init_params stm32_i2c_extra_init_params
157#define tx_trigger_extra_init_params stm32_tx_trigger_extra_init_params
158#define vcom_extra_init_params stm32_vcom_extra_init_params
160#define spi_ops stm32_spi_ops
161#define uart_ops stm32_uart_ops
162#define gpio_ops stm32_gpio_ops
163#define i2c_ops stm32_i2c_ops
164#define irq_ops stm32_gpio_irq_ops
165#define tdm_ops stm32_tdm_platform_ops
166#define DMA_IRQ_ID GPDMA1_Channel7_IRQn
167#define trigger_gpio_irq_ops stm32_gpio_irq_ops
168#define dma_ops stm32_dma_ops
169#define pwm_ops stm32_pwm_ops
170#define vcom_ops stm32_usb_uart_ops
172#define TRIGGER_GPIO_PORT DIG_AUX_1_PORT
173#define TRIGGER_GPIO_PIN DIG_AUX_1
174#define TRIGGER_GPIO_IRQ_CTRL_ID TRIGGER_GPIO_PIN
175#define CSB_GPIO_PORT STM32_SPI_CS_PORT
177#define SPI_DEVICE_ID STM32_SPI_ID
178#define I2C_DEVICE_ID STM32_I2C_ID
179#define TRIGGER_INT_ID 0
180#define trigger_gpio_handle 0
182#error "No/Invalid active platform selected"
190#if defined(DEV_AD4170)
191#define DIFFERENTIAL_CHNS 4
192#define SINGLE_ENDED_CHNS 8
193#elif defined(DEV_AD4171)
194#define DIFFERENTIAL_CHNS 8
195#define SINGLE_ENDED_CHNS 16
196#elif defined(DEV_AD4172)
197#define DIFFERENTIAL_CHNS 3
198#define SINGLE_ENDED_CHNS 6
199#elif defined (DEV_AD4190)
200#define DIFFERENTIAL_CHNS 4
201#define SINGLE_ENDED_CHNS 8
205#if (ACTIVE_DEMO_MODE_CONFIG == USER_DEFAULT_CONFIG)
207#define ad4170_init_params ad4170_user_config_params
208#elif ((ACTIVE_DEMO_MODE_CONFIG == RTD_2WIRE_CONFIG) || \
209(ACTIVE_DEMO_MODE_CONFIG == RTD_3WIRE_CONFIG) || (ACTIVE_DEMO_MODE_CONFIG == RTD_4WIRE_CONFIG))
211#define ad4170_init_params ad4170_rtd_config_params
212#elif (ACTIVE_DEMO_MODE_CONFIG == THERMISTOR_CONFIG)
214#define ad4170_init_params ad4170_thermistor_config_params
215#elif (ACTIVE_DEMO_MODE_CONFIG == THERMOCOUPLE_CONFIG)
217#define ad4170_init_params ad4170_thermocouple_config_params
218#elif (ACTIVE_DEMO_MODE_CONFIG == ACCELEROMETER_CONFIG)
220#define ad4170_init_params ad4170_accelerometer_config_params
221#elif (ACTIVE_DEMO_MODE_CONFIG == LOADCELL_CONFIG)
223#define ad4170_init_params ad4170_loadcell_config_params
226#define ad4170_init_params ad4170_user_config_params
227#warning "No/Invalid active demo config selected, user config used as default"
231#define ADC_RESOLUTION 24
234#define BYTES_PER_SAMPLE sizeof(uint32_t)
237#define ADC_MAX_COUNT_UNIPOLAR (uint32_t)((1 << ADC_RESOLUTION) - 1)
240#define ADC_MAX_COUNT_BIPOLAR (uint32_t)(1 << (ADC_RESOLUTION-1))
243#define AD4170_REFIN_REFIN1_VOLTAGE 2.5
244#define AD4170_REFIN_REFIN2_VOLTAGE 2.5
245#define AD4170_REFIN_AVDD_VOLTAGE 5.0
246#define AD4170_REFIN_REFOUT_VOLTAGE 2.5
249#define FIRMWARE_NAME "ad4170_iio"
251#if !defined(PLATFORM_NAME)
252#define PLATFORM_NAME HW_CARRIER_NAME
258#define VIRTUAL_COM_PORT_VID 0x0456
259#define VIRTUAL_COM_PORT_PID 0xb66c
261#define VIRTUAL_COM_SERIAL_NUM (FIRMWARE_NAME "_" DEVICE_NAME "_" STR(PLATFORM_NAME))
264#define IIO_UART_BAUD_RATE (230400)
267#if defined (TARGET_SDP_K1)
280#define AD4170_INTERNAL_CLOCK (16000000U)
283#define AD4170_DEFLT_SAMPLING_FREQUENCY (AD4170_INTERNAL_CLOCK / FS_TO_ODR_CONV_SCALER)
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:172
struct no_os_pwm_desc * tx_trigger_desc
Definition app_config.c:145
struct no_os_spi_init_param spi_init_params
Definition ad3530r_user_config.c:48
struct no_os_gpio_desc * trigger_gpio_desc
Definition app_config.c:166
struct no_os_gpio_desc * csb_gpio_desc
Definition app_config.c:175
Header for AD4170 Accelerometer configurations module.
struct no_os_gpio_init_param gpio_init_rdy
Definition app_config.c:71
struct no_os_gpio_desc * led_gpio_desc
Definition app_config.c:186
struct no_os_tdm_desc * ad4170_tdm_desc
Definition app_config.c:128
struct no_os_gpio_init_param gpio_init_ldac_n
Definition app_config.c:63
struct no_os_gpio_init_param gpio_init_sync_inb
Definition app_config.c:79
Header for AD4170 Loadcell configurations module.
Header for AD4170 RTD configurations module.
Header for AD4170 thermistor configurations module.
Header for AD4170 default user configurations file.
The file contain common macros that needs to be followed same across all the projects.
Header file for STM32 platform configurations.