mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +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
|
#ifdef DEVELHELP
|
||||||
#include "cpu_conf.h"
|
#include "cpu_conf.h"
|
||||||
#define DEBUG_PRINT(...) \
|
#define DEBUG_PRINT(...) do { printf(__VA_ARGS__); } while (0)
|
||||||
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)
|
|
||||||
#else
|
#else
|
||||||
#define DEBUG_PRINT(...) printf(__VA_ARGS__)
|
#define DEBUG_PRINT(...) printf(__VA_ARGS__)
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user