#define ASSERT(expression) { \
if (!(expression)) { \
LOG_PRINTF("Assertion(%s) failed: file \"%s\", line %d\n", \
#expression, __FILE__, __LINE__); \
CALLSTACK(); \
hal_cpu_halt(); \
} \
}
自己定义ASSERT来检验代码
最新推荐文章于 2021-05-25 09:40:34 发布