mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
core: remove DEBUGF macro
This commit is contained in:
parent
fac95806a8
commit
ac88d7960c
@ -14,15 +14,10 @@
|
|||||||
* @brief Debug-header
|
* @brief Debug-header
|
||||||
*
|
*
|
||||||
* @details If *ENABLE_DEBUG* is defined inside an implementation file, all
|
* @details If *ENABLE_DEBUG* is defined inside an implementation file, all
|
||||||
* calls to ::DEBUG and ::DEBUGF* will work the same as *printf*
|
* calls to ::DEBUG will work the same as *printf* and output the
|
||||||
* and output the given information to stdout. If *ENABLE_DEBUG*
|
* given information to stdout. If *ENABLE_DEBUG* is not defined,
|
||||||
* is not defined, all calls to ::DEBUG and ::DEBUGF will be
|
* all calls to ::DEBUG will be ignored.
|
||||||
* ignored.
|
|
||||||
*
|
*
|
||||||
* In addition to just printing the given information ::DEBUGF
|
|
||||||
* will further print extended debug information about the current
|
|
||||||
* thread and function.
|
|
||||||
*
|
|
||||||
* @author Kaspar Schleiser <kaspar@schleiser.de>
|
* @author Kaspar Schleiser <kaspar@schleiser.de>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -40,8 +35,7 @@ extern "C" {
|
|||||||
/**
|
/**
|
||||||
* @def ENABLE_DEBUG
|
* @def ENABLE_DEBUG
|
||||||
* @brief This macro can be defined as 0 or other on a file-based level.
|
* @brief This macro can be defined as 0 or other on a file-based level.
|
||||||
* If ENABLE_DEBUG is 0 @ref DEBUG() and @ref DEBUGF() will generate
|
* @ref DEBUG() will generate output only if ENABLE_DEBUG is non-zero.
|
||||||
* no output if not they will generate output.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -100,22 +94,8 @@ extern "C" {
|
|||||||
* @note Another name for ::DEBUG_PRINT
|
* @note Another name for ::DEBUG_PRINT
|
||||||
*/
|
*/
|
||||||
#define DEBUG(...) DEBUG_PRINT(__VA_ARGS__)
|
#define DEBUG(...) DEBUG_PRINT(__VA_ARGS__)
|
||||||
/**
|
|
||||||
* @def DEBUGF
|
|
||||||
*
|
|
||||||
* @brief Print extended debug information about the current thread and
|
|
||||||
* function to stdout
|
|
||||||
*/
|
|
||||||
#define DEBUGF(...) \
|
|
||||||
do { \
|
|
||||||
DEBUG_PRINT("DEBUG(%s): %s:%d in %s: ", \
|
|
||||||
sched_active_thread ? sched_active_thread->name : "NO THREAD", \
|
|
||||||
__FILE__, __LINE__, DEBUG_FUNC); \
|
|
||||||
DEBUG_PRINT(__VA_ARGS__); \
|
|
||||||
} while (0)
|
|
||||||
#else
|
#else
|
||||||
#define DEBUG(...)
|
#define DEBUG(...)
|
||||||
#define DEBUGF(...)
|
|
||||||
#endif
|
#endif
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user