Browse Source

update

master
zhaohe 8 months ago
parent
commit
1e3db3bb1a
  1. 9
      basic/zlog.h

9
basic/zlog.h

@ -35,8 +35,15 @@ extern void zdelay_ms(int ms);
} \
}
#define ZASSERT_INFO(cond, fmt, ...) \
if (!(cond)) { \
while (1) { \
zlog("ASSERT: %s [%s:%d]" fmt "\n", #cond, __FILE__, __LINE__, ##__VA_ARGS__); \
zdelay_ms(1000); \
} \
}
#define ZASSERT(cond) ASSERT(cond, "")
#define ZASSERT_INFO(cond, info) ASSERT(cond, info)
#define ZARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0]))

Loading…
Cancel
Save