13 #ifndef _APP_CONFIG_H_
14 #define _APP_CONFIG_H_
27 #define MBED_PLATFORM 1
30 #define CONTINUOUS_DATA_CAPTURE 0
31 #define BURST_DATA_CAPTURE 1
35 #define STR(s) XSTR(s)
46 #if defined(DEV_AD7689)
47 #define ACTIVE_DEVICE ID_AD7689
48 #define ACTIVE_DEVICE_NAME "ad7689"
49 #define DEVICE_NAME "DEV_AD7689"
50 #elif defined(DEV_AD7682)
51 #define ACTIVE_DEVICE ID_AD7682
52 #define ACTIVE_DEVICE_NAME "ad7682"
53 #define DEVICE_NAME "DEV_AD7682"
54 #elif defined(DEV_AD7949)
55 #define ACTIVE_DEVICE ID_AD7949
56 #define ACTIVE_DEVICE_NAME "ad7949"
57 #define DEVICE_NAME "DEV_AD7949"
58 #elif defined(DEV_AD7699)
59 #define ACTIVE_DEVICE ID_AD7699
60 #define ACTIVE_DEVICE_NAME "ad7699"
61 #define DEVICE_NAME "DEV_AD7699"
63 #warning No/Unsupported device selected. AD7689 used as default.
65 #define ACTIVE_DEVICE ID_AD7689
66 #define ACTIVE_DEVICE_NAME "ad7689"
67 #define DEVICE_NAME "DEV_AD7689"
71 #if !defined(ACTIVE_PLATFORM)
72 #define ACTIVE_PLATFORM MBED_PLATFORM
76 #if !defined(DATA_CAPTURE_MODE)
77 #define DATA_CAPTURE_MODE CONTINUOUS_DATA_CAPTURE
83 #if !defined(USE_PHY_COM_PORT)
84 #define USE_VIRTUAL_COM_PORT
87 #if (ACTIVE_PLATFORM == MBED_PLATFORM)
90 #define HW_CARRIER_NAME TARGET_NAME
93 #define pwm_extra_init_params mbed_pwm_extra_init_params
94 #if defined(USE_VIRTUAL_COM_PORT)
95 #define uart_extra_init_params mbed_vcom_extra_init_params
96 #define uart_ops mbed_virtual_com_ops
98 #define uart_extra_init_params mbed_uart_extra_init_params
99 #define uart_ops mbed_uart_ops
101 #define spi_extra_init_params mbed_spi_extra_init_params
102 #define i2c_extra_init_params mbed_i2c_extra_init_params
103 #define trigger_gpio_irq_extra_params mbed_trigger_gpio_irq_init_params
104 #define trigger_gpio_extra_init_params mbed_trigger_gpio_extra_init_params
105 #define trigger_gpio_ops mbed_gpio_ops
106 #define irq_ops mbed_gpio_irq_ops
107 #define gpio_ops mbed_gpio_ops
108 #define spi_ops mbed_spi_ops
109 #define i2c_ops mbed_i2c_ops
110 #define trigger_gpio_irq_ops mbed_gpio_irq_ops
111 #define trigger_gpio_handle 0
112 #define IRQ_INT_ID GPIO_IRQ_ID1
113 #define TRIGGER_GPIO_PORT 0
114 #define TRIGGER_GPIO_PIN PWM_TRIGGER
115 #define TRIGGER_INT_ID GPIO_IRQ_ID1
117 #error "No/Invalid active platform selected"
121 #define HW_MEZZANINE_NAME "EVAL-AD7689-ARDZ"
124 #if defined(DEV_AD7949)
125 #define ADC_RESOLUTION 14
127 #define ADC_RESOLUTION 16
131 #define ADC_MAX_COUNT_UNIPOLAR (uint32_t)((1 << ADC_RESOLUTION) - 1)
134 #define ADC_MAX_COUNT_BIPOLAR (uint32_t)(1 << (ADC_RESOLUTION-1))
137 #if defined(DEV_AD7682)
138 #define TEMPERATURE_CHN 4
139 #define ADC_CHN_COUNT 5
141 #define TEMPERATURE_CHN 8
142 #define ADC_CHN_COUNT 9
147 #define FIRMWARE_NAME "ad7689_iio"
149 #if !defined(PLATFORM_NAME)
150 #define PLATFORM_NAME HW_CARRIER_NAME
157 #define VIRTUAL_COM_PORT_VID 0x0456
158 #define VIRTUAL_COM_PORT_PID 0xb66c
160 #define VIRTUAL_COM_SERIAL_NUM (FIRMWARE_NAME "_" DEVICE_NAME "_" STR(PLATFORM_NAME))
163 #define IIO_UART_BAUD_RATE (230400)
172 extern struct no_os_uart_desc *
uart_desc;
int32_t init_pwm_trigger(void)
Initialize the PWM trigger contoller.
Definition: app_config.c:161
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:194
struct no_os_gpio_desc * led_gpio_desc
Definition: app_config.c:213
Header file for Mbed platform configurations.