mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
core/debug: printf what asked to print
This commit is contained in:
parent
bb07bb6613
commit
b39fbe23e3
@ -44,17 +44,7 @@ extern "C" {
|
||||
*/
|
||||
#ifdef DEVELHELP
|
||||
#include "cpu_conf.h"
|
||||
#define DEBUG_PRINT(...) \
|
||||
do { \
|
||||
if ((thread_get_active() == NULL) || \
|
||||
(thread_get_active()->stack_size >= \
|
||||
THREAD_EXTRA_STACKSIZE_PRINTF)) { \
|
||||
printf(__VA_ARGS__); \
|
||||
} \
|
||||
else { \
|
||||
puts("Cannot debug, stack too small. Consider using DEBUG_PUTS()."); \
|
||||
} \
|
||||
} while (0)
|
||||
#define DEBUG_PRINT(...) do { printf(__VA_ARGS__); } while (0)
|
||||
#else
|
||||
#define DEBUG_PRINT(...) printf(__VA_ARGS__)
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user