From c71439b73a01c4f7971959ddc031cde38103135a Mon Sep 17 00:00:00 2001 From: zhaohe Date: Thu, 21 Nov 2024 17:53:56 +0800 Subject: [PATCH] update zlog --- basic/zlog.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/basic/zlog.h b/basic/zlog.h index b16cc93..3769a5f 100644 --- a/basic/zlog.h +++ b/basic/zlog.h @@ -37,6 +37,11 @@ extern void zdelay_ms(int ms); #define ZASSERT(cond) ASSERT(cond, "") #define ZASSERT_INFO(cond, info) ASSERT(cond, info) +#define HAL_ASSERT(exptr) \ + { \ + HAL_StatusTypeDef status = (exptr); \ + ASSERT(status == HAL_OK, #exptr); \ + } #define ZARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0]))