• Main Page
  • Modules
  • Index
  • File List
  • Globals

lib/assertions/assertions.h

Go to the documentation of this file.
00001 /* Copyright (c) 2009 Nordic Semiconductor. All Rights Reserved.
00002  *
00003  * The information contained herein is confidential property of Nordic 
00004  * Semiconductor ASA.Terms and conditions of usage are described in detail 
00005  * in NORDIC SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 
00006  *
00007  * Licensees are granted free, non-transferable use of the information. NO
00008  * WARRENTY of ANY KIND is provided. This heading must NOT be removed from
00009  * the file.
00010  *              
00011  * $LastChangedRevision: 133 $
00012  */                                              
00013 
00024 #ifndef ASSERT_H
00025 #define ASSERT_H
00026 
00027 #include "assertions_setup.h"
00028 #include "stdint.h"
00029 
00030 #ifdef ASSERT_ENABLE
00031 
00041 void assert_handler(uint16_t line, char* file);
00042 
00050 #define ASSERT(condition) do{ \
00051   {                                                    \
00052     if(!(condition))                                      \
00053     {                                                  \
00054       assert_handler(ASSERT_LINE, ASSERT_FILE); \
00055     }                                                  \
00056   }                                                    \
00057 } while(0);
00058 
00059 #else
00060 
00061 #define ASSERT(a)
00062 
00064 #endif
00065 #endif

Generated on Fri Apr 20 2012 14:11:45 for nRFGo SDK by  doxygen 1.7.2