We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b28ef6 commit b97c94aCopy full SHA for b97c94a
nexa_decoder/nexa_decoder.ino
@@ -44,6 +44,24 @@
44
45
#define DEBUG 0
46
47
+#if DEBUG
48
+#define ASSERT(expr) do { \
49
+ if (!(expr)) { \
50
+ Serial.print(__FILE__); \
51
+ Serial.print(F(":")); \
52
+ Serial.print(__LINE__); \
53
+ Serial.print(F(" in '")); \
54
+ Serial.print(__PRETTY_FUNCTION__); \
55
+ Serial.print(F("': Assertion failed: ")); \
56
+ Serial.println(#expr); \
57
+ Serial.flush(); \
58
+ abort(); \
59
+ } \
60
+} while (0)
61
+#else
62
+#define ASSERT(expr, msg)
63
+#endif
64
+
65
#define ARRAY_LENGTH(a) ((sizeof (a)) / (sizeof (a)[0]))
66
67
// Adjust the following to match where the RF receiver is connected.
0 commit comments