log: Retouch documentation; Rearrenge level logic; Rename LOG_VERBOSITY to LOG_FORMAT...
[bertos.git] / bertos / cfg / debug.h
index 7d457487677fea83173d66f2d777b019b821e3b4..02c0489460bc30ce008a3ea797d40d7c14467a0e 100644 (file)
@@ -37,7 +37,7 @@
  * diagnostic messages to a serial terminal or a JTAG debugger.
  *
  * \version $Id$
- * \author Bernardo Innocenti <bernie@develer.com>
+ * \author Bernie Innocenti <bernie@codewiz.org>
  */
 
 #ifndef BERTOS_DEBUG_H
         * memory regions.  This helps catching pointers taken from
         * struct/class memebers when the struct pointer was NULL.
         */
-       #define ASSERT_VALID_PTR(p)         ((void)(LIKELY((p) >= 0x200) ? 0 : __invalid_ptr(p, #p, THIS_FILE, __LINE__)))
+       #define ASSERT_VALID_PTR(p) ((void)(LIKELY((p) >= (void *)CPU_RAM_START) \
+               ? 0 : __invalid_ptr(p, #p, THIS_FILE, __LINE__)))
 
        /**
         * Check that the given pointer is not pointing to invalid memory.
         *
         * \see ASSERT_VALID_PTR()
         */
-       #define ASSERT_VALID_PTR_OR_NULL(p) ((void)(LIKELY((p == NULL) || ((p) >= 0x200)) ? 0 : __invalid_ptr((p), #p, THIS_FILE, __LINE__)))
+       #define ASSERT_VALID_PTR_OR_NULL(p) ((void)(LIKELY((p == NULL) || ((p) >= (void *)CPU_RAM_START)) \
+               ? 0 : __invalid_ptr((p), #p, THIS_FILE, __LINE__)))
 
        #if !CONFIG_KDEBUG_DISABLE_TRACE
                #define TRACE  __trace(__func__)