precision-converters-firmware
Loading...
Searching...
No Matches
app_config.h
Go to the documentation of this file.
1/*************************************************************************/
13#ifndef _APP_CONFIG_H_
14#define _APP_CONFIG_H_
15
16/******************************************************************************/
17/***************************** Include Files **********************************/
18/******************************************************************************/
19#include <stdint.h>
20#include "common_macros.h"
21
22/******************************************************************************/
23/********************** Macros and Constants Definitions **********************/
24/******************************************************************************/
25
26/* Select the active platform */
27#if !defined(ACTIVE_PLATFORM)
28#define ACTIVE_PLATFORM STM32_PLATFORM
29#endif
30
31// **** Note for User: ACTIVE_DEVICE selection ****//
32/* Define the device type here from the list of below device type defines
33 * (one at a time. Defining more than one device can result into compile error).
34 * e.g. #define DEV_AD4111 -> This will make AD4111 as an ACTIVE_DEVICE.
35 * The ACTIVE_DEVICE is default set to AD4111, if device type is not defined.
36 * */
37//#define DEV_AD4111
38
39#if defined(DEV_AD4111)
40#define ACTIVE_DEVICE_NAME "AD4111"
41#elif defined(DEV_AD4112)
42#define ACTIVE_DEVICE_NAME "AD4112"
43#elif defined(DEV_AD4114)
44#define ACTIVE_DEVICE_NAME "AD4114"
45#elif defined(DEV_AD4115)
46#define ACTIVE_DEVICE_NAME "AD4115"
47#elif defined(DEV_AD4116)
48#define ACTIVE_DEVICE_NAME "AD4116"
49#elif defined(DEV_AD7172_2)
50#define AD7172_2_INIT
51#define ACTIVE_DEVICE_NAME "AD7172-2"
52#elif defined(DEV_AD7172_4)
53#define AD7172_4_INIT
54#define ACTIVE_DEVICE_NAME "AD7172-4"
55#elif defined(DEV_AD7173_8)
56#define AD7173_8_INIT
57#define ACTIVE_DEVICE_NAME "AD7173-8"
58#elif defined(DEV_AD7175_2)
59#define AD7175_2_INIT
60#define ACTIVE_DEVICE_NAME "AD7175-2"
61#elif defined(DEV_AD7175_8)
62#define AD7175_8_INIT
63#define ACTIVE_DEVICE_NAME "AD7175-8"
64#elif defined(DEV_AD7176_2)
65#define AD7176_2_INIT
66#define ACTIVE_DEVICE_NAME "AD7176-2"
67#elif defined(DEV_AD7177_2)
68#define AD7177_2_INIT
69#define ACTIVE_DEVICE_NAME "AD7177-2"
70#else
71#warning No/Unsupported ADxxxxy symbol defined. AD4111 defined
72#define DEV_AD4111
73#define ACTIVE_DEVICE_NAME "AD4111"
74#endif
75
76#if (ACTIVE_PLATFORM == STM32_PLATFORM)
77#include "app_config_stm32.h"
78#define spi_init_extra_params stm32_spi_extra_init_params
79#define uart_extra_init_params stm32_uart_extra_init_params
80#else
81#error "No/Invalid active platform selected"
82#endif
83
84/* Denominator of the scale factor to be applied while converting raw values to actual voltage */
85#if defined(DEV_AD4111) || defined(DEV_AD4112) || \
86 defined(DEV_AD4114) || defined(DEV_AD4115) || defined (DEV_AD4116)
87#define SCALE_FACTOR_DR 0.1
88#else
89#define SCALE_FACTOR_DR 1
90#endif
91
92#endif //_APP_CONFIG_H_
The file contain common macros that needs to be followed same across all the projects.
Header file for STM32 platform configurations.