Skip to content

Commit 58082ab

Browse files
authored
add assert to header for some bsp driver
1 parent 4347746 commit 58082ab

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

components/fal/inc/fal_def.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@
2525
#define FAL_DEBUG 0
2626
#endif
2727

28+
#if FAL_DEBUG
29+
#ifdef assert
30+
#undef assert
31+
#endif
32+
#define assert(x) RT_ASSERT(x)
33+
#endif
34+
2835
/* FAL flash and partition device name max length */
2936
#ifndef FAL_DEV_NAME_MAX
3037
#define FAL_DEV_NAME_MAX 24

components/fal/inc/fal_log.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,6 @@
1414
#include "fal_def.h"
1515

1616
#if FAL_DEBUG
17-
#ifdef assert
18-
#undef assert
19-
#endif
20-
#define assert(EXPR) \
21-
if (!(EXPR)) \
22-
{ \
23-
FAL_PRINTF("(%s) has assert failed at %s.\n", #EXPR, __FUNCTION__); \
24-
while (1); \
25-
}
2617

2718
/* debug level log */
2819
#ifdef log_d

0 commit comments

Comments
 (0)