DeBugPrint (dbprint)
Homebrew minimal low-level println/printf replacement
debug_dbprint.h
Go to the documentation of this file.
1 /***************************************************************************//**
2  * @file debug_dbprint.h
3  * @brief Enable or disable printing to UART with dbprint.
4  * @details
5  * **This header file should be called in every other file where there are UART
6  * dbprint debugging statements. Depending on the value of `DEBUG_DBPRINT`,
7  * UART statements are enabled or disabled.**
8  * @version 7.0
9  * @author Brecht Van Eeckhoudt
10  *
11  * ******************************************************************************
12  *
13  * @section License
14  *
15  * **Copyright (C) 2019 - Brecht Van Eeckhoudt**
16  *
17  * This program is free software: you can redistribute it and/or modify
18  * it under the terms of the **GNU General Public License** as published by
19  * the Free Software Foundation, either **version 3** of the License, or
20  * (at your option) any later version.
21  *
22  * This program is distributed in the hope that it will be useful,
23  * but WITHOUT ANY WARRANTY; without even the implied warranty of
24  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25  * GNU General Public License for more details.
26  *
27  * *A copy of the GNU General Public License can be found in the `LICENSE`
28  * file along with this source code.*
29  *
30  * @n
31  *
32  * Some methods also use code obtained from examples from [Silicon Labs' GitHub](https://github.com/SiliconLabs/peripheral_examples).
33  * These sections are licensed under the Silabs License Agreement. See the file
34  * "Silabs_License_Agreement.txt" for details. Before using this software for
35  * any purpose, you must agree to the terms of that agreement.
36  *
37  ******************************************************************************/
38 
39 
40 /* Include guards prevent multiple inclusions of the same header */
41 #ifndef _DEBUG_DBPRINT_H_
42 #define _DEBUG_DBPRINT_H_
43 
44 
45 /** Public definition to enable/disable UART debugging
46  * @li `1` - Enable the UART debugging statements.
47  * @li `0` - Remove all UART debugging statements from the uploaded code. */
48 #define DEBUG_DBPRINT 1
49 
50 
51 #if DEBUG_DBPRINT == 1 /* DEBUG_DBPRINT */
52 #include "dbprint.h"
53 #endif /* DEBUG_DBPRINT */
54 
55 
56 #endif /* _DEBUG_DBPRINT_H_ */
Homebrew println/printf replacement "DeBugPrint".