Browse Source

加强ZLOGD功能

master
zhaohe 8 months ago
parent
commit
f9a31c529c
  1. 14
      basic/zlog.h

14
basic/zlog.h

@ -14,7 +14,7 @@ extern void zdelay_ms(int ms);
zlog("%08lu INFO [%-8s] " fmt "\n", zget_ticket(), TAG, ##__VA_ARGS__); \
}
#define ZLOGD(TAG, fmt, ...) \
if (g_xs_enable_log) { \
if (g_xs_enable_log && enDebugFlag) { \
zlog("%08lu DEBU [%-8s] " fmt "\n", zget_ticket(), TAG, ##__VA_ARGS__); \
}
#define ZLOGE(TAG, fmt, ...) \
@ -35,16 +35,16 @@ extern void zdelay_ms(int ms);
} \
}
#define ZASSERT_INFO(cond, fmt, ...) \
if (!(cond)) { \
while (1) { \
#define ZASSERT_INFO(cond, fmt, ...) \
if (!(cond)) { \
while (1) { \
zlog("ASSERT: %s [%s:%d]" fmt "\n", #cond, __FILE__, __LINE__, ##__VA_ARGS__); \
zdelay_ms(1000); \
} \
zdelay_ms(1000); \
} \
}
#define ZASSERT(cond) ASSERT(cond, "")
#define ZASSERT(cond) ASSERT(cond, "")
#define ZASSERT(cond) ASSERT(cond, "")
#define HAL_ASSERT(exptr) \
{ \
HAL_StatusTypeDef status = (exptr); \

Loading…
Cancel
Save