From: lottaviano Date: Mon, 3 Jan 2011 09:51:06 +0000 (+0000) Subject: doc: Add documentation for ASSERT and ASSERT2. X-Git-Tag: 2.7.0~306 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=c2dceae6e510636a81423abf8af27e4244b0d850;p=bertos.git doc: Add documentation for ASSERT and ASSERT2. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4660 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/cfg/debug.h b/bertos/cfg/debug.h index cccaf8cc..25768293 100644 --- a/bertos/cfg/debug.h +++ b/bertos/cfg/debug.h @@ -30,6 +30,10 @@ * * --> * + * \defgroup debug Debugging facilities and macros + * \ingroup core + * \{ + * * \brief Simple debug facilities for hosted and embedded C/C++ applications. * * Debug output goes to stderr in hosted applications. @@ -160,7 +164,13 @@ #endif /* !CPU_HARVARD */ #if !CONFIG_KDEBUG_ASSERT_NO_TEXT + /** + * Assert a pre-condition on code. + */ #define ASSERT(x) ((void)(LIKELY(x) ? 0 : __bassert(#x, THIS_FILE, __LINE__))) + /** + * Assert a pre-condition and give explanation message when assert fails + */ #define ASSERT2(x, help) ((void)(LIKELY(x) ? 0 : __bassert(help " (" #x ")", THIS_FILE, __LINE__))) #else #define ASSERT(x) ((void)(LIKELY(x) ? 0 : __bassert("", THIS_FILE, __LINE__))) @@ -324,4 +334,6 @@ #endif /* _DEBUG */ +/** \} */ // defgroup debug + #endif /* BERTOS_DEBUG_H */