Bluetooth SD logs (#7197)

Bluetooth SD logs
This commit is contained in:
Bertrand Songis
2019-12-16 12:22:48 +01:00
committed by GitHub
parent b475a7064d
commit 16c9a92f49
14 changed files with 94 additions and 31 deletions
+6 -3
View File
@@ -24,6 +24,9 @@
#include <inttypes.h>
#include "rtc.h"
#include "dump.h"
#define CRLF "\r\n"
#if defined(CLI)
#include "cli.h"
#else
@@ -56,7 +59,7 @@ uint8_t auxSerialTracesEnabled();
#endif
#define TRACE_NOCRLF(...) debugPrintf(__VA_ARGS__)
#define TRACE(f_, ...) debugPrintf((f_ "\r\n"), ##__VA_ARGS__)
#define TRACE(f_, ...) debugPrintf((f_ CRLF), ##__VA_ARGS__)
#define DUMP(data, size) dump(data, size)
#define TRACE_DEBUG(...) debugPrintf("-D- " __VA_ARGS__)
#define TRACE_DEBUG_WP(...) debugPrintf(__VA_ARGS__)
@@ -67,7 +70,7 @@ uint8_t auxSerialTracesEnabled();
#define TRACE_ERROR(...) debugPrintf("-E- " __VA_ARGS__)
#if defined(TRACE_LUA_INTERNALS_ENABLED)
#define TRACE_LUA_INTERNALS(f_, ...) debugPrintf(("[LUA INT] " f_ "\r\n"), ##__VA_ARGS__)
#define TRACE_LUA_INTERNALS(f_, ...) debugPrintf(("[LUA INT] " f_ CRLF), ##__VA_ARGS__)
#define TRACE_LUA_INTERNALS_WITH_LINEINFO(L, f_, ...) do { \
lua_Debug ar; \
@@ -75,7 +78,7 @@ uint8_t auxSerialTracesEnabled();
lua_getinfo(L, ">Sl", &ar); \
debugPrintf("%s:%d: ", ar.short_src, ar.currentline); \
} \
debugPrintf(("[LUA INT] " f_ "\r\n"), ##__VA_ARGS__); \
debugPrintf(("[LUA INT] " f_ CRLF), ##__VA_ARGS__); \
} while(0)
#else
#define TRACE_LUA_INTERNALS(...)