EFR32 Blue Gecko 1 Software Documentation  efr32bg1-doc-5.1.2
em_assert.h
Go to the documentation of this file.
1 /***************************************************************************/
33 #ifndef EM_ASSERT_H
34 #define EM_ASSERT_H
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
40 /***************************************************************************/
45 #if defined(DOXY_DOC_ONLY)
46 
49 #define DEBUG_EFM
50 
51 #endif
52 
53 #if defined(DEBUG_EFM) || defined(DEBUG_EFM_USER)
54 /***************************************************************************/
81 /* Due to footprint considerations, we only pass file name and line number, */
82 /* not the assert expression (nor function name (C99)) */
83 void assertEFM(const char *file, int line);
84 #define EFM_ASSERT(expr) ((expr) ? ((void)0) : assertEFM(__FILE__, __LINE__))
85 
86 #else
87 
89 #define EFM_ASSERT(expr) ((void)(expr))
90 
91 #endif /* defined(DEBUG_EFM) || defined(DEBUG_EFM_USER) */
92 
96 #ifdef __cplusplus
97 }
98 #endif
99 
100 #endif /* EM_ASSERT_H */
void assertEFM(const char *file, int line)
EFM internal assert handling.
Definition: em_assert.c:70