22 #include "no_os_uart.h"
23 #include "no_os_pwm.h"
24 #include "no_os_irq.h"
25 #include "no_os_gpio.h"
32 #define MBED_PLATFORM 0
33 #define STM32_PLATFORM 1
37 #define SPI_INTERRUPT 1
41 #define STR(s) XSTR(s)
52 #if defined(DEV_AD3541R)
53 #define ACTIVE_DEVICE_NAME "ad3541r"
54 #define DEVICE_NAME "DEV_AD3541R"
55 #define ACTIVE_DEVICE_ID AD3541R_ID
56 #define NUMBER_OF_CHANNELS 1U
57 #elif defined(DEV_AD3542R_12)
58 #define ACTIVE_DEVICE_NAME "ad3542r-12"
59 #define DEVICE_NAME "DEV_AD3542R_12"
60 #define ACTIVE_DEVICE_ID AD3542R_ID
61 #define NUMBER_OF_CHANNELS 2U
62 #elif defined(DEV_AD3542R_16)
63 #define ACTIVE_DEVICE_NAME "ad3542r-16"
64 #define DEVICE_NAME "DEV_AD3542R_16"
65 #define ACTIVE_DEVICE_ID AD3542R_ID
66 #define NUMBER_OF_CHANNELS 2U
67 #elif defined(DEV_AD3551R)
68 #define ACTIVE_DEVICE_NAME "ad3551r"
69 #define DEVICE_NAME "DEV_AD3551R"
70 #define ACTIVE_DEVICE_ID AD3551R_ID
71 #define NUMBER_OF_CHANNELS 1U
72 #elif defined(DEV_AD3552R)
73 #define ACTIVE_DEVICE_NAME "ad3552r"
74 #define DEVICE_NAME "DEV_AD3552R"
75 #define ACTIVE_DEVICE_ID AD3552R_ID
76 #define NUMBER_OF_CHANNELS 2U
78 #warning No/Unsupported ADxxxxy symbol defined. AD3552R defined
80 #define ACTIVE_DEVICE_NAME "ad3552r"
81 #define DEVICE_NAME "DEV_AD3552R"
82 #define ACTIVE_DEVICE_ID AD3552R_ID
83 #define NUMBER_OF_CHANNELS 2U
87 #if !defined(ACTIVE_PLATFORM)
88 #define ACTIVE_PLATFORM MBED_PLATFORM
94 #if !defined(USE_PHY_COM_PORT)
95 #define USE_VIRTUAL_COM_PORT
100 #if !defined(INTERFACE_MODE)
101 #if (ACTIVE_PLATFORM == MBED_PLATFORM)
102 #define INTERFACE_MODE SPI_INTERRUPT
104 #define INTERFACE_MODE SPI_DMA
112 #define DAC_RESOLUTION 16
114 #if (ACTIVE_PLATFORM == MBED_PLATFORM)
116 #define HW_CARRIER_NAME TARGET_NAME
117 #elif (ACTIVE_PLATFORM == STM32_PLATFORM)
118 #include "app_config_stm32.h"
120 #error "No/Invalid active platform selected"
124 #define IIO_UART_BAUD_RATE (230400)
127 #if !defined(DEVICE_NAME)
128 #define DEVICE_NAME "DEV_AD3552R"
132 #define FIRMWARE_NAME "ad355xr_iio"
134 #if !defined(PLATFORM_NAME)
135 #define PLATFORM_NAME HW_CARRIER_NAME
141 #define VIRTUAL_COM_PORT_VID 0x0456
142 #define VIRTUAL_COM_PORT_PID 0xb66c
144 #define VIRTUAL_COM_SERIAL_NUM (FIRMWARE_NAME "_" DEVICE_NAME "_" STR(PLATFORM_NAME))
147 #if defined(USE_PHY_COM_PORT)
149 #if (ACTIVE_PLATFORM == MBED_PLATFORM)
150 #define CONSOLE_STDIO_PORT_AVAILABLE
154 #define CONSOLE_STDIO_PORT_AVAILABLE
161 #define CONV_PERIOD_NSEC(x) (((float)(1.0 / x) * 1000000) * 1000)
162 #define CONV_FREQUENCY_HZ(x) (((float)(1.0 / x) * 1000000) * 1000)
163 #define CONV_DUTY_CYCLE_NSEC(x,y) (((float)y / 100) * CONV_PERIOD_NSEC(x))
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
int32_t init_ldac_pwm_trigger(void)
Initialize the PWM trigger contoller for ldac.
Definition: app_config.c:152
struct no_os_pwm_desc * spi_dma_tx_stop_pwm_desc
Definition: app_config.c:136
struct no_os_pwm_desc * ldac_pwm_desc
Definition: app_config.c:133
struct no_os_uart_desc * uart_iio_com_desc
Definition: app_config.c:127
void ldac_pos_edge_detect_callback(void *ctx)
Interrupt Service Routine to monitor ldac positive edge.
Definition: app_config.c:190
Header file for Mbed platform configurations.