EZR32 Leopard Gecko Software Documentation  ezr32lg-doc-4.2.1
em_assert.h
Go to the documentation of this file.
1 /***************************************************************************/
51 #ifndef __SILICON_LABS_EM_ASSERT_H__
52 #define __SILICON_LABS_EM_ASSERT_H__
53 
54 #ifdef __cplusplus
55 extern "C" {
56 #endif
57 
60 #if defined(DEBUG_EFM) || defined(DEBUG_EFM_USER)
61 
62 /* Due to footprint considerations, we only pass file name and line number, */
63 /* not the assert expression (nor function name (C99)) */
64 void assertEFM(const char *file, int line);
65 #define EFM_ASSERT(expr) ((expr) ? ((void)0) : assertEFM(__FILE__, __LINE__))
66 
67 #else
68 
69 #define EFM_ASSERT(expr) ((void)(expr))
70 
71 #endif /* defined(DEBUG_EFM) || defined(DEBUG_EFM_USER) */
72 
75 #ifdef __cplusplus
76 }
77 #endif
78 
79 #endif /* __SILICON_LABS_EM_ASSERT_H__ */