24#define STM32_PLATFORM 1
27#define BUSRT_DATA_CAPTURE 0
28#define CONTINUOUS_DATA_CAPTURE 1
40#define ACTIVE_DEVICE_NAME "ad4080"
42#define FIRMWARE_NAME "ad4080_iio"
44#define DEVICE_NAME "DEV_AD4080"
46#define HW_MEZZANINE_NAME "EVAL-AD4080ARDZ"
49#define NUMBER_OF_CHANNELS 1
53#if !defined(ACTIVE_PLATFORM)
54#define ACTIVE_PLATFORM STM32_PLATFORM
57#if (ACTIVE_PLATFORM != STM32_PLATFORM)
58#error "No/Invalid active platform selected"
62#if !defined(ACTIVE_OSC)
63#define ACTIVE_OSC OSC_40M
71#if (ACTIVE_OSC == OSC_40M)
72#define OSC_40M_DEFAULT_STATE NO_OS_GPIO_HIGH
73#define OSC_20M_DEFAULT_STATE NO_OS_GPIO_LOW
74#define OSC_10M_DEFAULT_STATE NO_OS_GPIO_LOW
75#elif (ACTIVE_OSC == OSC_20M)
76#define OSC_40M_DEFAULT_STATE NO_OS_GPIO_LOW
77#define OSC_20M_DEFAULT_STATE NO_OS_GPIO_HIGH
78#define OSC_10M_DEFAULT_STATE NO_OS_GPIO_LOW
80#define OSC_10M_DEFAULT_STATE NO_OS_GPIO_HIGH
81#define OSC_40M_DEFAULT_STATE NO_OS_GPIO_LOW
82#define OSC_20M_DEFAULT_STATE NO_OS_GPIO_LOW
86#if (ACTIVE_PLATFORM == STM32_PLATFORM)
88#define config_spi_extra_init_params stm32_config_spi_extra_init_params
89#define data_spi_extra_init_params stm32_data_spi_extra_init_params
90#define data_qspi_extra_init_params stm32_data_qspi_extra_init_params
91#define uart_extra_init_params stm32_uart_extra_init_params
92#define vcom_extra_init_params stm32_vcom_extra_init_params
93#define gpio_xtal_osc_en_extra_init_params stm32_gpio_xtal_osc_en_init_params
94#define gpio_gp1_extra_init_params stm32_gpio_gp1_init_params
95#define gpio_gp2_extra_init_params stm32_gpio_gp2_init_params
96#define gpio_gp3_extra_init_params stm32_gpio_gp3_init_params
97#define gpio_40m_osc_extra_init_params stm32_gpio_40m_osc_init_params
98#define gpio_20m_osc_extra_init_params stm32_gpio_20m_osc_init_params
99#define gpio_10m_osc_extra_init_params stm32_gpio_10m_osc_init_params
100#define gpio_afe_ctrl_extra_init_params stm32_gpio_afe_ctrl_init_params
101#define i2c_extra_init_params stm32_i2c_extra_init_params
102#define gpio_ops stm32_gpio_ops
103#define spi_ops stm32_spi_ops
104#define xspi_ops stm32_xspi_ops
105#define uart_ops stm32_uart_ops
106#define vcom_ops stm32_usb_uart_ops
107#define i2c_ops stm32_i2c_ops
109#error "No / Invalid active platform selected"
113#if !defined(DATA_CAPTURE_MODE)
114#define DATA_CAPTURE_MODE BURST_DATA_CAPTURE
121#if !defined(USE_PHY_COM_PORT)
122#define USE_VIRTUAL_COM_PORT
126#if defined(USE_VIRTUAL_COM_PORT)
128#define CONSOLE_STDIO_PORT_AVAILABLE
132#define AD4080_CNV_CLK_FREQ_HZ (40000000/(NO_OS_BIT(ACTIVE_OSC)))
135#define AD4080_ADC_RESOLUTION_BITS 20
138#define AD4080_SIGN_EXTENDED_RESOLUTION_BITS \
139 (AD4080_ADC_RESOLUTION_BITS + 4)
142#define AD4080_SIGN_EXTENDED_RESOLUTION_BYTES \
143 (AD4080_SIGN_EXTENDED_RESOLUTION_BITS / 8)
146#define ADC_REF_VOLTAGE 3
149#define AD4080_SIGN_EXT_BITS 4
152#define ADC_MAX_COUNT (uint32_t)(1 << (AD4080_ADC_RESOLUTION_BITS - 1))
155#define IIO_UART_BAUD_RATE (230400)
158#if !defined(PLATFORM_NAME)
159#define PLATFORM_NAME HW_CARRIER_NAME
166#define VIRTUAL_COM_PORT_VID 0x0456
167#define VIRTUAL_COM_PORT_PID 0xb66c
171#define VIRTUAL_COM_SERIAL_NUM \
172 (FIRMWARE_NAME "_" DEVICE_NAME "_" STR(PLATFORM_NAME))
192extern struct no_os_spi_desc *quad_spi_desc;
193extern 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:176
struct no_os_gpio_desc * gpio_osc_en_40m_desc
Definition app_config.c:222
struct no_os_uart_desc * uart_iio_comm_desc
Definition app_config.c:199
struct no_os_gpio_desc * gpio_gp1_desc
Definition app_config.c:210
struct no_os_gpio_desc * gpio_osc_en_20m_desc
Definition app_config.c:225
struct no_os_gpio_desc * gpio_osc_en_10m_desc
Definition app_config.c:228
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:216
struct no_os_gpio_desc * gpio_afe_ctrl_desc
Definition app_config.c:207
struct no_os_gpio_desc * gpio_xtal_osc_en_desc
Definition app_config.c:219
struct no_os_gpio_desc * gpio_gp2_desc
Definition app_config.c:213
Header file for STM32 platform configurations.