42 |
*/ |
*/ |
43 |
|
|
44 |
#define DBG_LEVEL_OFF 0 |
#define DBG_LEVEL_OFF 0 |
45 |
#define DBG_LEVEL_WARNING 1 /* bad checksums, dropped packets, ... */ |
#define DBG_LEVEL_WARNING 1 /* bad checksums, dropped packets, ... */ |
46 |
#define DBG_LEVEL_SERIOUS 2 /* memory allocation failures, ... */ |
#define DBG_LEVEL_SERIOUS 2 /* memory allocation failures, ... */ |
47 |
#define DBG_LEVEL_SEVERE 3 /* */ |
#define DBG_LEVEL_SEVERE 3 /* */ |
48 |
#define DBG_MASK_LEVEL 3 |
#define DBG_MASK_LEVEL 3 |
49 |
|
|
50 |
/** flag for DEBUGF to enable that debug message */ |
/** flag for DEBUGF to enable that debug message */ |
67 |
* AND is of correct type AND is at least DBG_LEVEL |
* AND is of correct type AND is at least DBG_LEVEL |
68 |
*/ |
*/ |
69 |
# 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 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) |
70 |
# define LWIP_ERROR(x) do { LWIP_PLATFORM_DIAG(x); } while(0) |
# define LWIP_ERROR(x) do { LWIP_PLATFORM_DIAG(x); } while(0) |
71 |
#else /* LWIP_DEBUG */ |
#else /* LWIP_DEBUG */ |
72 |
# define LWIP_ASSERT(x,y) |
# define LWIP_ASSERT(x,y) |
73 |
# define DEBUGF(debug,x) |
# define DEBUGF(debug,x) |
74 |
# define LWIP_ERROR(x) |
# define LWIP_ERROR(x) |
75 |
#endif /* LWIP_DEBUG */ |
#endif /* LWIP_DEBUG */ |
76 |
|
|
77 |
#endif /* __LWIP_DEBUG_H__ */ |
#endif /* __LWIP_DEBUG_H__ */ |