26#define BUSRT_DATA_CAPTURE 0
27#define CONTINUOUS_DATA_CAPTURE 1
39#define ACTIVE_DEVICE_NAME "ad4080"
41#define FIRMWARE_NAME "ad4080_iio"
43#define DEVICE_NAME "DEV_AD4080"
45#define HW_MEZZANINE_NAME "EVAL-AD4080ARDZ"
48#define NUMBER_OF_CHANNELS 1
52#if !defined(ACTIVE_PLATFORM)
53#define ACTIVE_PLATFORM STM32_PLATFORM
57#if !defined(ACTIVE_OSC)
58#define ACTIVE_OSC OSC_40M
66#if (ACTIVE_OSC == OSC_40M)
67#define OSC_40M_DEFAULT_STATE NO_OS_GPIO_HIGH
68#define OSC_20M_DEFAULT_STATE NO_OS_GPIO_LOW
69#define OSC_10M_DEFAULT_STATE NO_OS_GPIO_LOW
70#elif (ACTIVE_OSC == OSC_20M)
71#define OSC_40M_DEFAULT_STATE NO_OS_GPIO_LOW
72#define OSC_20M_DEFAULT_STATE NO_OS_GPIO_HIGH
73#define OSC_10M_DEFAULT_STATE NO_OS_GPIO_LOW
75#define OSC_10M_DEFAULT_STATE NO_OS_GPIO_HIGH
76#define OSC_40M_DEFAULT_STATE NO_OS_GPIO_LOW
77#define OSC_20M_DEFAULT_STATE NO_OS_GPIO_LOW
81#if (ACTIVE_PLATFORM == STM32_PLATFORM)
83#define config_spi_extra_init_params stm32_config_spi_extra_init_params
84#define data_spi_extra_init_params stm32_data_spi_extra_init_params
85#define data_qspi_extra_init_params stm32_data_qspi_extra_init_params
86#define uart_extra_init_params stm32_uart_extra_init_params
87#define vcom_extra_init_params stm32_vcom_extra_init_params
88#define gpio_xtal_osc_en_extra_init_params stm32_gpio_xtal_osc_en_init_params
89#define gpio_gp1_extra_init_params stm32_gpio_gp1_init_params
90#define gpio_gp2_extra_init_params stm32_gpio_gp2_init_params
91#define gpio_gp3_extra_init_params stm32_gpio_gp3_init_params
92#define gpio_40m_osc_extra_init_params stm32_gpio_40m_osc_init_params
93#define gpio_20m_osc_extra_init_params stm32_gpio_20m_osc_init_params
94#define gpio_10m_osc_extra_init_params stm32_gpio_10m_osc_init_params
95#define gpio_afe_ctrl_extra_init_params stm32_gpio_afe_ctrl_init_params
96#define i2c_extra_init_params stm32_i2c_extra_init_params
97#define gpio_ops stm32_gpio_ops
98#define spi_ops stm32_spi_ops
99#define xspi_ops stm32_xspi_ops
100#define uart_ops stm32_uart_ops
101#define vcom_ops stm32_usb_uart_ops
102#define i2c_ops stm32_i2c_ops
104#error "No / Invalid active platform selected"
108#if !defined(DATA_CAPTURE_MODE)
109#define DATA_CAPTURE_MODE BURST_DATA_CAPTURE
116#if !defined(USE_PHY_COM_PORT)
117#define USE_VIRTUAL_COM_PORT
121#if defined(USE_VIRTUAL_COM_PORT)
123#define CONSOLE_STDIO_PORT_AVAILABLE
127#define AD4080_CNV_CLK_FREQ_HZ (40000000/(NO_OS_BIT(ACTIVE_OSC)))
130#define AD4080_ADC_RESOLUTION_BITS 20
133#define AD4080_SIGN_EXTENDED_RESOLUTION_BITS \
134 (AD4080_ADC_RESOLUTION_BITS + 4)
137#define AD4080_SIGN_EXTENDED_RESOLUTION_BYTES \
138 (AD4080_SIGN_EXTENDED_RESOLUTION_BITS / 8)
141#define ADC_REF_VOLTAGE 3
144#define AD4080_SIGN_EXT_BITS 4
147#define ADC_MAX_COUNT (uint32_t)(1 << (AD4080_ADC_RESOLUTION_BITS - 1))
150#define IIO_UART_BAUD_RATE (230400)
153#if !defined(PLATFORM_NAME)
154#define PLATFORM_NAME HW_CARRIER_NAME
161#define VIRTUAL_COM_PORT_VID 0x0456
162#define VIRTUAL_COM_PORT_PID 0xb66c
166#define VIRTUAL_COM_SERIAL_NUM \
167 (FIRMWARE_NAME "_" DEVICE_NAME "_" STR(PLATFORM_NAME))
187extern struct no_os_spi_desc *quad_spi_desc;
188extern struct no_os_spi_init_param qspi_init_params;
int32_t init_system(void)
Initialize the system peripherals.
Definition app_config.c:185
struct no_os_eeprom_desc * eeprom_desc
Definition app_config.c:170
struct no_os_gpio_desc * gpio_osc_en_40m_desc
Definition app_config.c:220
struct no_os_uart_desc * uart_iio_comm_desc
Definition app_config.c:197
struct no_os_gpio_desc * gpio_gp1_desc
Definition app_config.c:208
struct no_os_gpio_desc * gpio_osc_en_20m_desc
Definition app_config.c:223
struct no_os_gpio_desc * gpio_osc_en_10m_desc
Definition app_config.c:226
struct no_os_spi_init_param data_spi_init_params
Definition app_config.c:45
struct no_os_spi_init_param config_spi_init_params
Definition app_config.c:34
struct no_os_gpio_desc * gpio_gp3_desc
Definition app_config.c:214
struct no_os_gpio_desc * gpio_afe_ctrl_desc
Definition app_config.c:205
struct no_os_gpio_desc * gpio_xtal_osc_en_desc
Definition app_config.c:217
struct no_os_gpio_desc * gpio_gp2_desc
Definition app_config.c:211
The file contain common macros that needs to be followed same across all the projects.
Header file for STM32 platform configurations.