core/debug: Fix code style errors
This commit is contained in:
parent
981b4eb8d0
commit
ea8c85ae8b
@ -45,14 +45,15 @@ extern "C" {
|
|||||||
#ifdef DEVELHELP
|
#ifdef DEVELHELP
|
||||||
#include "cpu_conf.h"
|
#include "cpu_conf.h"
|
||||||
#define DEBUG_PRINT(...) \
|
#define DEBUG_PRINT(...) \
|
||||||
do { \
|
do { \
|
||||||
if ((sched_active_thread == NULL) || (sched_active_thread->stack_size >= THREAD_EXTRA_STACKSIZE_PRINTF)) { \
|
if ((sched_active_thread == NULL) || \
|
||||||
printf(__VA_ARGS__); \
|
(sched_active_thread->stack_size >= THREAD_EXTRA_STACKSIZE_PRINTF)) { \
|
||||||
} \
|
printf(__VA_ARGS__); \
|
||||||
else { \
|
} \
|
||||||
puts("Cannot debug, stack too small. Consider using DEBUG_PUTS()."); \
|
else { \
|
||||||
} \
|
puts("Cannot debug, stack too small. Consider using DEBUG_PUTS()."); \
|
||||||
} while (0)
|
} \
|
||||||
|
} while (0)
|
||||||
#else
|
#else
|
||||||
#define DEBUG_PRINT(...) printf(__VA_ARGS__)
|
#define DEBUG_PRINT(...) printf(__VA_ARGS__)
|
||||||
#endif
|
#endif
|
||||||
@ -92,7 +93,7 @@ extern "C" {
|
|||||||
*
|
*
|
||||||
* @note Another name for ::DEBUG_PRINT
|
* @note Another name for ::DEBUG_PRINT
|
||||||
*/
|
*/
|
||||||
#define DEBUG(...) if (ENABLE_DEBUG) DEBUG_PRINT(__VA_ARGS__)
|
#define DEBUG(...) if (ENABLE_DEBUG) { DEBUG_PRINT(__VA_ARGS__); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @def DEBUG_PUTS
|
* @def DEBUG_PUTS
|
||||||
@ -100,7 +101,7 @@ extern "C" {
|
|||||||
* @brief Print debug information to stdout using puts(), so no stack size
|
* @brief Print debug information to stdout using puts(), so no stack size
|
||||||
* restrictions do apply.
|
* restrictions do apply.
|
||||||
*/
|
*/
|
||||||
#define DEBUG_PUTS(str) if (ENABLE_DEBUG) puts(str)
|
#define DEBUG_PUTS(str) if (ENABLE_DEBUG) { puts(str); }
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user