diff options
author | Damien George <damien@micropython.org> | 2024-08-20 15:55:07 +1000 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2024-08-29 23:47:55 +1000 |
commit | aee002dd80ad8829ae247950f784b1f145fb822e (patch) | |
tree | f1522e895ed0f2ae243622c614d8c4c2b7965deb | |
parent | a1a16ffd75e1cc5ca977a3d799d5c7de0da5e585 (diff) |
stm32/lwip_inc: Implement LWIP_PLATFORM_DIAG macro in terms of printf.
This allows enabling lwIP debugging output. For example, to enable PPP
debugging add the following to `mpconfigboard.h`:
#define LWIP_DEBUG 1
#define PPP_DEBUG LWIP_DBG_ON
Signed-off-by: Damien George <damien@micropython.org>
-rw-r--r-- | ports/stm32/lwip_inc/arch/cc.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ports/stm32/lwip_inc/arch/cc.h b/ports/stm32/lwip_inc/arch/cc.h index fc5230ef7..a818d6d6a 100644 --- a/ports/stm32/lwip_inc/arch/cc.h +++ b/ports/stm32/lwip_inc/arch/cc.h @@ -2,7 +2,9 @@ #define MICROPY_INCLUDED_STM32_LWIP_ARCH_CC_H #include <assert.h> -#define LWIP_PLATFORM_DIAG(x) +#include <stdio.h> + +#define LWIP_PLATFORM_DIAG(x) do { printf x; } while (0) #define LWIP_PLATFORM_ASSERT(x) { assert(1); } #define LWIP_NO_CTYPE_H 1 |