mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-25 18:14:53 +00:00
Added default settings for DBG_MIN_LEVEL and definitions for the possible
levels.
This commit is contained in:
parent
45c13ad08f
commit
2673568cfd
@ -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 */
|
||||
|
@ -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__ */
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user