From f9a31c529c42e35ea439998f8b6292ed0f885c70 Mon Sep 17 00:00:00 2001 From: zhaohe Date: Fri, 29 Nov 2024 16:54:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=BC=BAZLOGD=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- basic/zlog.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/basic/zlog.h b/basic/zlog.h index 4eaa0ed..e9350dc 100644 --- a/basic/zlog.h +++ b/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); \