Added default settings for DBG_MIN_LEVEL and definitions for the possible

levels.
This commit is contained in:
davidhaas 2003-03-17 16:59:22 +00:00
parent 45c13ad08f
commit 2673568cfd
2 changed files with 12 additions and 3 deletions

View File

@ -40,7 +40,12 @@
* - 2 serious
* - 3 severe
*/
#define DBG_MASK_LEVEL 3
#define DBG_LEVEL_OFF 0
#define DBG_LEVEL_WARNING 1
#define DBG_LEVEL_SERIOUS 2
#define DBG_LEVEL_SEVERE 3
#define DBG_MASK_LEVEL 3
/** flag for DEBUGF to enable the debug message */
#define DBG_ON 0x80U
@ -62,12 +67,12 @@
/** print debug message only if debug message is enabled AND is of correct type
* AND is at least DBG_LEVEL */
#define DEBUGF(debug, x) do { if ((debug & DBG_ON) && (debug & DBG_TYPES_ON) && ((debug & DBG_MASK_LEVEL) >= DBG_MIN_LEVEL)) { LWIP_PLATFORM_DIAG(x); if (debug & DBG_HALT) while(1); } } while(0)
#define LWIP_ERROR(x) do { LWIP_PLATFORM_DIAG(x); } while(0)
#define LWIP_ERROR(x) do { LWIP_PLATFORM_DIAG(x); } while(0)
#else /* LWIP_DEBUG */
#define LWIP_ASSERT(x,y)
#define DEBUGF(debug, x)
#define LWIP_ERROR(x)
#define LWIP_ERROR(x)
#endif /* LWIP_DEBUG */

View File

@ -430,6 +430,10 @@ a lot of data that needs to be copied, this should be set high. */
#endif
#ifndef DBG_MIN_LEVEL
#define DBG_MIN_LEVEL DBG_LEVEL_OFF
#endif
#endif /* __LWIP_OPT_H__ */