28#define MBED_PLATFORM 1
29#define STM32_PLATFORM 2
38#if !defined(ACTIVE_PLATFORM)
39#define ACTIVE_PLATFORM STM32_PLATFORM
55#if defined(DEV_CN0586)
56#define ACTIVE_DEVICE_NAME "ad5754r"
57#define DEVICE_NAME "DEV_CN0586"
58#define HW_MEZZANINE_NAME "EVAL-CN0586-ARDZ"
60#define ACTIVE_DEVICE_NAME "ad5754r"
61#define DEVICE_NAME "DEV_AD5754R"
62#define HW_MEZZANINE_NAME "EVAL-AD5754REBZ"
68#if !defined(USE_PHY_COM_PORT)
69#define USE_VIRTUAL_COM_PORT
73#define AD5754R_VREF 2.5
76#define DAC_MAX_COUNT_BIN_OFFSET (uint32_t)((1 << AD5754R_MAX_RESOLUTION) - 1)
79#define DAC_MAX_COUNT_2S_COMPL (uint32_t)(1 << (AD5754R_MAX_RESOLUTION-1))
84#if !defined(USE_TWOS_COMPLEMENT_CODING)
85#define USE_BINARY_CODING
88#if (ACTIVE_PLATFORM == MBED_PLATFORM)
91#define HW_CARRIER_NAME TARGET_NAME
94#define pwm_extra_init_params mbed_pwm_extra_init_params
95#define uart_extra_init_params mbed_uart_extra_init_params
96#define vcom_extra_init_params mbed_vcom_extra_init_params
97#define spi_extra_init_params mbed_spi_extra_init_params
98#define i2c_extra_init_params mbed_i2c_extra_init_params
99#define trigger_gpio_irq_extra_params mbed_trigger_gpio_irq_init_params
100#define ldac_gpio_extra_init_params mbed_ldac_gpio_init_params
101#define clear_gpio_extra_init_params mbed_clear_gpio_init_params
102#define dac_gpio_ops mbed_gpio_ops
103#define TRIGGER_INT_ID GPIO_IRQ_ID1
104#define trigger_gpio_handle 0
106#elif (ACTIVE_PLATFORM == STM32_PLATFORM)
107#include "app_config_stm32.h"
108#define HW_CARRIER_NAME TARGET_NAME
109#define pwm_extra_init_params stm32_pwm_extra_init_params
110#define uart_extra_init_params stm32_uart_extra_init_params
111#define vcom_extra_init_params stm32_vcom_extra_init_params
112#define spi_extra_init_params stm32_spi_extra_init_params
113#define trigger_gpio_irq_extra_params stm32_trigger_gpio_irq_init_params
114#define ldac_gpio_extra_init_params stm32_ldac_gpio_init_params
115#define clear_gpio_extra_init_params stm32_clear_gpio_init_params
116#define dac_gpio_ops stm32_gpio_ops
117#define trigger_gpio_handle 0
119#error "No/Invalid active platform selected"
125#define IIO_UART_BAUD_RATE (230400)
128#define FIRMWARE_NAME "ad5754r_iio"
130#if !defined(PLATFORM_NAME)
131#define PLATFORM_NAME HW_CARRIER_NAME
137#define VIRTUAL_COM_PORT_VID 0x0456
138#define VIRTUAL_COM_PORT_PID 0xb66c
140#define VIRTUAL_COM_SERIAL_NUM (FIRMWARE_NAME "_" DEVICE_NAME "_" STR(PLATFORM_NAME))
143#if defined(USE_PHY_COM_PORT)
145#if (ACTIVE_PLATFORM == MBED_PLATFORM || ACTIVE_PLATFORM == STM32_PLATFORM)
146#define CONSOLE_STDIO_PORT_AVAILABLE
150#define CONSOLE_STDIO_PORT_AVAILABLE
157#define CONV_TRIGGER_PERIOD_NSEC(x) (((float)(1.0 / x) * 1000000) * 1000)
158#define CONV_TRIGGER_DUTY_CYCLE_NSEC(x) ((CONV_TRIGGER_PERIOD_NSEC(x) * 9) / 10)
171extern struct no_os_pwm_desc *
pwm_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_pwm_init_param pwm_init_params
Definition app_config.h:150
struct no_os_eeprom_desc * eeprom_desc
Definition app_config.c:176
struct no_os_pwm_desc * pwm_desc
Definition app_config.c:106
struct no_os_gpio_desc * trigger_gpio_desc
Definition app_config.c:170
struct no_os_uart_desc * uart_iio_com_desc
Definition app_config.c:164
int32_t init_pwm(void)
Initialize the PWM interface.
Definition app_config.c:267
struct no_os_uart_desc * uart_console_stdio_desc
Definition app_config.c:100
struct no_os_gpio_init_param clear_gpio_params
Definition app_config.c:132
struct no_os_gpio_init_param ldac_gpio_params
Definition app_config.c:123
Header file for Mbed platform configurations.