em_assert.h

Go to the documentation of this file.
00001 /***************************************************************************/
00052 #ifndef __SILICON_LABS_EM_ASSERT_H_
00053 #define __SILICON_LABS_EM_ASSERT_H_
00054 
00055 #ifdef __cplusplus
00056 extern "C" {
00057 #endif
00058 
00061 #if defined(DEBUG_EFM) || defined(DEBUG_EFM_USER)
00062 
00063 /* Due to footprint considerations, we only pass file name and line number, */
00064 /* not the assert expression (nor function name (C99)) */
00065 void assertEFM(const char *file, int line);
00066 #define EFM_ASSERT(expr)    ((expr) ? ((void)0) : assertEFM(__FILE__, __LINE__))
00067 
00068 #else
00069 
00070 #define EFM_ASSERT(expr)    ((void)(expr))
00071 
00072 #endif /* defined(DEBUG_EFM) || defined(DEBUG_EFM_USER) */
00073 
00076 #ifdef __cplusplus
00077 }
00078 #endif
00079 
00080 #endif /* __SILICON_LABS_EM_ASSERT_H_ */