mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-03-29 13:20:09 +00:00
Made some flag defines unsigned.
This commit is contained in:
parent
20667e5163
commit
6457b93a1f
@ -53,31 +53,26 @@
|
||||
#define DBG_OFF 0x00U
|
||||
|
||||
/** flag for DEBUGF indicating a tracing message (to follow program flow) */
|
||||
#define DBG_TRACE 0x40
|
||||
#define DBG_TRACE 0x40U
|
||||
/** flag for DEBUGF indicating a state debug message (to follow states) */
|
||||
#define DBG_STATE 0x20
|
||||
#define DBG_STATE 0x20U
|
||||
/** flag for DEBUGF indicating newly added code, not thoroughly tested yet */
|
||||
#define DBG_FRESH 0x10
|
||||
#define DBG_FRESH 0x10U
|
||||
/** flag for DEBUGF to halt after printing this debug message */
|
||||
#define DBG_HALT 0x08
|
||||
#define DBG_HALT 0x08U
|
||||
|
||||
#ifdef LWIP_DEBUG
|
||||
|
||||
#define LWIP_ASSERT(x,y) do { if(!(y)) LWIP_PLATFORM_ASSERT(x); } while(0)
|
||||
# define LWIP_ASSERT(x,y) do { if(!(y)) LWIP_PLATFORM_ASSERT(x); } while(0)
|
||||
/** 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 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)
|
||||
#else /* LWIP_DEBUG */
|
||||
|
||||
#define LWIP_ASSERT(x,y)
|
||||
#define DEBUGF(debug, x)
|
||||
#define LWIP_ERROR(x)
|
||||
|
||||
|
||||
# define LWIP_ASSERT(x,y)
|
||||
# define DEBUGF(debug, x)
|
||||
# define LWIP_ERROR(x)
|
||||
#endif /* LWIP_DEBUG */
|
||||
|
||||
|
||||
#endif /* __LWIP_DEBUG_H__ */
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user