This commit is contained in:
2026-04-10 13:11:27 +02:00
parent e825475df3
commit b74366a546
5 changed files with 216 additions and 17 deletions

51
include/lwipopts.h Normal file
View File

@@ -0,0 +1,51 @@
#ifndef LWIPOPTS_H
#define LWIPOPTS_H
// lwIP configuration for Raspberry Pi Pico W (CYW43 + lwIP).
// This is a sane baseline for pico_cyw43_arch_lwip_threadsafe_background.
// example
#define NO_SYS 1
#define LWIP_SOCKET 0
#define LWIP_NETCONN 0
#define MEM_ALIGNMENT 4
#define MEM_SIZE 4000
#define MEMP_NUM_TCP_SEG 32
#define MEMP_NUM_ARP_QUEUE 10
#define PBUF_POOL_SIZE 24
#define LWIP_ARP 1
#define LWIP_ETHERNET 1
#define LWIP_ICMP 1
#define LWIP_RAW 1
#define LWIP_DHCP 1
#define LWIP_IPV4 1
#define LWIP_TCP 1
#define LWIP_UDP 1
#define LWIP_DNS 1
#define TCP_MSS 1460
#define TCP_WND (8 * TCP_MSS)
#define TCP_SND_BUF (8 * TCP_MSS)
#define TCP_SND_QUEUELEN ((4 * TCP_SND_BUF + TCP_MSS - 1) / TCP_MSS)
#define MEMP_NUM_TCP_PCB 5
#define MEMP_NUM_TCP_PCB_LISTEN 8
#define MEMP_NUM_SYS_TIMEOUT 10
#define LWIP_NETIF_STATUS_CALLBACK 1
#define LWIP_NETIF_LINK_CALLBACK 1
#define LWIP_NETIF_HOSTNAME 1
#define LWIP_TCP_KEEPALIVE 1
#define LWIP_SO_RCVTIMEO 1
#define LWIP_SO_SNDTIMEO 1
// Use system-provided timeval definition.
#define LWIP_TIMEVAL_PRIVATE 0
#define LWIP_CHKSUM_ALGORITHM 3
#endif // LWIPOPTS_H