Go to the documentation of this file.
11 #ifndef __ARD_ASSERT_HEADER
12 #define __ARD_ASSERT_HEADER
18 #define DEBUG_VAR(x) std::cout << REDB << F("DEBUG_VAR: ") << RED << F(#x) << F(" = ") << x << NONE << std::endl;
19 #define DEBUG_MSG(x) std::cout << REDB << F("DEBUG_MSG: ") << RED << F(x) << NONE << std::endl;
20 #define ASSERT(exp) if(!(exp)) {std::cout << REDB << F("ASSERT failed on line ") << __LINE__ << RED << F(" ") << F(#exp) << NONE << std::endl; assert(exp);}
21 #define ASSERT_MSG(exp, msg) if(!(exp)) {std::cout << REDB << F("ASSERT_MSG failed on line ") << __LINE__ << RED << F(" ") << F(#exp) << REDB << F(" ") << F(msg) << NONE << std::endl; assert(exp);}
24 #include <avr/pgmspace.h>
25 #define DEBUG_VAR(x) ustd::cout << REDB << F("DEBUG_VAR: ") << RED << F(#x) << F(" = ") << x << NONE << ustd::endl;
26 #define DEBUG_MSG(x) ustd::cout << REDB << F("DEBUG_MSG: ") << RED << F(x) << NONE << ustd::endl;
27 #define ASSERT(exp) if(!(exp)) {ustd::cout << REDB << F("ASSERT failed on line ") << __LINE__ << RED << F(" ") << F(#exp) << NONE << ustd::endl; while(true);}
28 #define ASSERT_MSG(exp, msg) if(!(exp)) {ustd::cout << REDB << F("ASSERT_MSG failed on line ") << __LINE__ << RED << F(" ") << F(#exp) << REDB << F(" ") << F(msg) << NONE << ustd::endl; while(true);}
31 #define DEBUG_VAR(x) ;
32 #define DEBUG_MSG(x) ;
34 #define ASSERT_MSG(exp, msg) ;
37 #endif //__ARD_ASSERT_HEADER