eBoard โ‘ โ‘งโ‘จ
Written for SIA 2017/2018
eagle_PreprocessorControl.h
Go to the documentation of this file.
1 
10 //=====================================================================================================================================================
11 // Preprocessor Macros
12 //=====================================================================================================================================================
13 
14 // This file contains various preprocessor tools provided by eBoard
16  #define VALUE_TO_STRING(x) #x
17 
19 #ifdef DOC
20  #define PREPROCESS_DEBUG 1
22 #endif
23 
25  #define VALUE(x) VALUE_TO_STRING(x)
26 
28 #ifndef PREPROCESS_DEBUG
29  #define PREPROCESS_DEBUG 0
30 #endif
31 
33  #define PPERFORM_PRAGMA(str) _Pragma(#str)
34 
35  #if PREPROCESS_DEBUG > 0
36  #pragma message("You are using eBoard-header ๐Ÿ‰" VALUE(EBOARD_VERSION) "{" VALUE(EBOARD_VERSION_NBR) "} written by EagleoutIce")
37  #define DEBUG_MSG(str) PPERFORM_PRAGMA(message ("" #str))
38  #define MACRO_MSG(mac,str) PPERFORM_PRAGMA(message("You set " #mac " to " VALUE(mac) ": " #str))
39  #else
40  #define DEBUG_MSG(str) ;
41  #define MACRO_MSG(mac,str) ;
42  #endif
43