Stepper-Motor-Control  v3.0.0
System on a Chip 2014 - Group 04
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
debugAndErrorOutput.h
Go to the documentation of this file.
1 /**
2  *****************************************************************************
3  * @file debugAndErrorOutput.h
4  * @author Michael Riedel
5  * @author Marc Kossmann
6  * @version v1.0.0
7  * @date 11.11.2014
8  * @brief Defines for Error and Debug-Output Management.
9  * @details Include this header for simplified logging-features.
10  *****************************************************************************
11  * @par History:
12  * @details v0.1.0 30.10.2014 Riedel
13  * - first draft for milestone 1b
14  * @details v1.0.0 02.11.2014 Riedel
15  * - added documentation for defines
16  *****************************************************************************
17  */
18 
19 #ifndef __DEBUG_AND_ERROR_OUTPUT_H__
20 #define __DEBUG_AND_ERROR_OUTPUT_H__
21 
22 /** @brief Generates extra debug output on terminal */
23 #define SOC2014_DEBUG
24 
25 #include "auxilaryFunctions.h"
26 
27 /**
28  * @brief Prints Debug-messages in the terminal.
29  * @details This define only works if switch SOC2014_DEBUG is set.
30  * Otherwise all debug(...)-statements are deleted from the codebase,
31  * while compilation.
32  *
33  * @param ... Sends the given string directly to the terminal (printf_term()).
34  */
35 #ifdef SOC2014_DEBUG
36 #define debug(...) printf_term(__VA_ARGS__)
37 #else
38 #define debug(...)
39 #endif // SOC2014_DEBUG
40 /**
41  * @brief Prints the Error-messages in the terminal.
42  *
43  * @param ... Sends the given string directly to the terminal (printf_term()).
44  */
45 #ifndef error
46 #define error(...) printf_term(__VA_ARGS__)
47 #endif // error
48 #endif // __DEBUG_AND_ERROR_OUTPUT_H__
Header file for auxilaryFunctions.c.