precision-converters-firmware
Loading...
Searching...
No Matches
app_config.h
Go to the documentation of this file.
1
15/******************************************************************************/
16/***************************** Include Files **********************************/
17/******************************************************************************/
18#ifndef _APP_CONFIG_H_
19#define _APP_CONFIG_H_
20
21#include <stdint.h>
22
23/******************************************************************************/
24/************************* Macros & Constant Definitions ***************************/
25/******************************************************************************/
26
27#define MBED_PLATFORM 1
28#define STM32_PLATFORM 2
29
30/* Select the active platform */
31#if !defined(ACTIVE_PLATFORM)
32#define ACTIVE_PLATFORM STM32_PLATFORM
33#endif
34
35// Supported Devices
36#define DEV_AD5592R 0
37#define DEV_AD5593R 1
38
39#define AD5593R_A0_STATE 0
40
41// **** Note for User: ACTIVE_DEVICE selection ****
42// Define the device type here from the list of below device type defines
43// e.g. #define ACTIVE_DEVICE ID_AD5593R -> This will set AD5593R as an ACTIVE_DEVICE.
44// The ACTIVE_DEVICE is default set to AD5592R, if device type is not defined.
45
46#if !defined(ACTIVE_DEVICE)
47#define ACTIVE_DEVICE DEV_AD5592R
48#endif
49
50#define NUM_CHANNELS 8
51
52#define AD5593R_I2C (0x10 | (AD5593R_A0_STATE & 0x01))
53
54#if (ACTIVE_PLATFORM == MBED_PLATFORM)
55#include "app_config_mbed.h"
56#define spi_init_extra_params mbed_spi_extra_init_params
57#define i2c_init_extra_params mbed_i2c_extra_init_params
58#else
59#include "app_config_stm32.h"
60#define spi_init_extra_params stm32_spi_extra_init_params
61#define i2c_init_extra_params stm32_i2c_extra_init_params
62#define uart_extra_init_params stm32_uart_extra_init_params
63#endif
64
65#endif //_APP_CONFIG_H_
Header file for Mbed platform configurations.