Skip to content

Commit 84a28ad

Browse files
Merge pull request #4997 from kjbracey-arm/lwip_debug
Correct LWIP_DEBUG definition
2 parents 857819f + 5a7405e commit 84a28ad

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

features/FEATURE_LWIP/lwip-interface/lwipopts.h

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,9 @@
7676
#error "Either IPv4 or IPv6 must be preferred."
7777
#endif
7878

79-
#if defined(MBED_CONF_LWIP_DEBUG_ENABLED)
80-
#define LWIP_DEBUG MBED_CONF_LWIP_DEBUG_ENABLED
81-
#else
82-
#define LWIP_DEBUG 0
79+
#undef LWIP_DEBUG
80+
#if MBED_CONF_LWIP_DEBUG_ENABLED
81+
#define LWIP_DEBUG 1
8382
#endif
8483

8584
#if NO_SYS == 0
@@ -100,7 +99,7 @@
10099
#define MBED_CONF_LWIP_TCPIP_THREAD_STACKSIZE 1200
101100
#endif
102101

103-
#if LWIP_DEBUG
102+
#ifdef LWIP_DEBUG
104103
#define TCPIP_THREAD_STACKSIZE MBED_CONF_LWIP_TCPIP_THREAD_STACKSIZE*2
105104
#else
106105
#define TCPIP_THREAD_STACKSIZE MBED_CONF_LWIP_TCPIP_THREAD_STACKSIZE
@@ -118,7 +117,7 @@
118117
#define MBED_CONF_LWIP_PPP_THREAD_STACKSIZE 768
119118
#endif
120119

121-
#if LWIP_DEBUG
120+
#ifdef LWIP_DEBUG
122121
#define DEFAULT_THREAD_STACKSIZE MBED_CONF_LWIP_DEFAULT_THREAD_STACKSIZE*2
123122
#define PPP_THREAD_STACK_SIZE MBED_CONF_LWIP_PPP_THREAD_STACKSIZE*2
124123
#else
@@ -258,7 +257,7 @@
258257
#define ETHARP_DEBUG LWIP_DBG_OFF
259258
#define UDP_LPC_EMAC LWIP_DBG_OFF
260259

261-
#if LWIP_DEBUG
260+
#ifdef LWIP_DEBUG
262261
#define MEMP_OVERFLOW_CHECK 1
263262
#define MEMP_SANITY_CHECK 1
264263
#define LWIP_DBG_TYPES_ON LWIP_DBG_ON

0 commit comments

Comments
 (0)