stm32: Add optional lwip loopback support.

MICROPY_PY_LWIP_LOOPBACK must be set at the make level to enable this.

Signed-off-by: Peter Züger <zueger.peter@icloud.com>
This commit is contained in:
Peter Züger 2023-11-03 11:18:05 +01:00 committed by Damien George
parent 1879db7105
commit a23dbdca79
2 changed files with 7 additions and 0 deletions

View File

@ -24,6 +24,9 @@
#define LWIP_NETIF_HOSTNAME 1
#define LWIP_NETIF_EXT_STATUS_CALLBACK 1
#define LWIP_LOOPIF_MULTICAST 1
#define LWIP_LOOPBACK_MAX_PBUFS 8
#define LWIP_IPV6 0
#define LWIP_DHCP 1
#define LWIP_DHCP_CHECK_LINK_UP 1

View File

@ -72,6 +72,10 @@ STATIC void pyb_lwip_poll(void) {
// Run the lwIP internal updates
sys_check_timeouts();
#if LWIP_NETIF_LOOPBACK
netif_poll_all();
#endif
}
void mod_network_lwip_poll_wrapper(uint32_t ticks_ms) {