summaryrefslogtreecommitdiff
path: root/nuttx/include/assert.h
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2013-06-23 14:39:56 -0600
committerGregory Nutt <gnutt@nuttx.org>2013-06-23 14:39:56 -0600
commit9d4f3f645e606d812e3bec76a10940691b30b5ff (patch)
treeec970f690586d7ce93d937df8d6389bc1ecbdf57 /nuttx/include/assert.h
parent333edc2da8d4bad41a3ea553bf635cbad5119427 (diff)
downloadnuttx-9d4f3f645e606d812e3bec76a10940691b30b5ff.tar.gz
nuttx-9d4f3f645e606d812e3bec76a10940691b30b5ff.tar.bz2
nuttx-9d4f3f645e606d812e3bec76a10940691b30b5ff.zip
Add support for the UG-2843HHSWEG04 OLED and for the SAM4L Xplained Pro OLED module that uses that OLED.
Diffstat (limited to 'nuttx/include/assert.h')
-rw-r--r--nuttx/include/assert.h40
1 files changed, 24 insertions, 16 deletions
diff --git a/nuttx/include/assert.h b/nuttx/include/assert.h
index 2159ea868..8934d4d55 100644
--- a/nuttx/include/assert.h
+++ b/nuttx/include/assert.h
@@ -63,43 +63,51 @@
# define VERIFY(f) \
{ if ((f) < 0) up_assert((const uint8_t *)__FILE__, (int)__LINE__); }
+# define PANIC() \
+ up_assert((const uint8_t *)__FILE__, (int)__LINE__)
+
# ifdef CONFIG_DEBUG
+
# define DEBUGASSERT(f) \
{ if (!(f)) up_assert((const uint8_t *)__FILE__, (int)__LINE__); }
+
# define DEBUGVERIFY(f) \
{ if ((f) < 0) up_assert((const uint8_t *)__FILE__, (int)__LINE__); }
+
+# define DEBUGPANIC() \
+ up_assert((const uint8_t *)__FILE__, (int)__LINE__)
+
# else
+
# define DEBUGASSERT(f)
# define DEBUGVERIFY(f) ((void)(f))
-# endif /* CONFIG_DEBUG */
+# define DEBUGPANIC()
-# define PANIC() \
- up_assert((const uint8_t *)__FILE__, (int)__LINE__)
+# endif /* CONFIG_DEBUG */
#else
-# define ASSERT(f) \
- { if (!(f)) up_assert(); }
-# define VERIFY(f) \
- { if ((f) < 0) up_assert(); }
+# define ASSERT(f) { if (!(f)) up_assert(); }
+# define VERIFY(f) { if ((f) < 0) up_assert(); }
+# define PANIC() up_assert()
# ifdef CONFIG_DEBUG
-# define DEBUGASSERT(f) \
- { if (!(f)) up_assert(); }
-# define DEBUGVERIFY(f) \
- { if ((f) < 0) up_assert(); }
+
+# define DEBUGASSERT(f) { if (!(f)) up_assert(); }
+# define DEBUGVERIFY(f) { if ((f) < 0) up_assert(); }
+# define DEBUGPANIC() up_assert()
+
# else
+
# define DEBUGASSERT(f)
# define DEBUGVERIFY(f) ((void)(f))
-# endif /* CONFIG_DEBUG */
-
-# define PANIC(code) \
- up_assert()
+# define DEBUGPANIC()
+# endif /* CONFIG_DEBUG */
#endif
#ifndef assert
-#define assert ASSERT
+# define assert ASSERT
#endif
/****************************************************************************