Minor changes for debug (indent, and set LWIP_DBG_TYPES_ON to LWIP_DBG_ON to have all traces selected display per default, in the same spirit that LWIP_DBG_MIN_LEVEL is set per default to LWIP_DBG_LEVEL_OFF)

This commit is contained in:
fbernon 2007-09-22 11:16:07 +00:00
parent c7e91d3302
commit c52ef1d2b3
2 changed files with 21 additions and 22 deletions

View File

@ -40,26 +40,25 @@
* - 2 serious
* - 3 severe
*/
#define LWIP_DBG_LEVEL_OFF 0
#define LWIP_DBG_LEVEL_WARNING 1 /* bad checksums, dropped packets, ... */
#define LWIP_DBG_LEVEL_SERIOUS 2 /* memory allocation failures, ... */
#define LWIP_DBG_LEVEL_SEVERE 3 /* */
#define LWIP_DBG_MASK_LEVEL 3
#define LWIP_DBG_LEVEL_OFF 0x00
#define LWIP_DBG_LEVEL_WARNING 0x01 /* bad checksums, dropped packets, ... */
#define LWIP_DBG_LEVEL_SERIOUS 0x02 /* memory allocation failures, ... */
#define LWIP_DBG_LEVEL_SEVERE 0x03
#define LWIP_DBG_MASK_LEVEL 0x03
/** flag for LWIP_DEBUGF to enable that debug message */
#define LWIP_DBG_ON 0x80U
#define LWIP_DBG_ON 0x80U
/** flag for LWIP_DEBUGF to disable that debug message */
#define LWIP_DBG_OFF 0x00U
#define LWIP_DBG_OFF 0x00U
/** flag for LWIP_DEBUGF indicating a tracing message (to follow program flow) */
#define LWIP_DBG_TRACE 0x40U
#define LWIP_DBG_TRACE 0x40U
/** flag for LWIP_DEBUGF indicating a state debug message (to follow module states) */
#define LWIP_DBG_STATE 0x20U
#define LWIP_DBG_STATE 0x20U
/** flag for LWIP_DEBUGF indicating newly added code, not thoroughly tested yet */
#define LWIP_DBG_FRESH 0x10U
#define LWIP_DBG_FRESH 0x10U
/** flag for LWIP_DEBUGF to halt after printing this debug message */
#define LWIP_DBG_HALT 0x08U
#define LWIP_DBG_HALT 0x08U
#ifndef LWIP_NOASSERT
#define LWIP_ASSERT(x,y) do { if(!(y)) LWIP_PLATFORM_ASSERT(x); } while(0)

View File

@ -1244,12 +1244,21 @@
---------- Debugging options ----------
---------------------------------------
*/
/**
* LWIP_DBG_MIN_LEVEL: After masking, the value of the debug is
* compared against this value. If it is smaller, then debugging
* messages are written.
*/
#ifndef LWIP_DBG_MIN_LEVEL
#define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_OFF
#endif
/**
* LWIP_DBG_TYPES_ON: A mask that can be used to globally enable/disable
* debug messages of certain types.
*/
#ifndef LWIP_DBG_TYPES_ON
#define LWIP_DBG_TYPES_ON 0
#define LWIP_DBG_TYPES_ON LWIP_DBG_ON
#endif
/**
@ -1477,13 +1486,4 @@
#define SNMP_MIB_DEBUG LWIP_DBG_OFF
#endif
/**
* LWIP_DBG_MIN_LEVEL: After masking, the value of the debug is
* compared against this value. If it is smaller, then debugging
* messages are written.
*/
#ifndef LWIP_DBG_MIN_LEVEL
#define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_OFF
#endif
#endif /* __LWIP_OPT_H__ */