Files
ch32v208_sens/port/lwipopts.h
2025-11-09 13:00:16 +06:00

61 lines
1.3 KiB
C

#ifndef __LWIPOPTS_H__
#define __LWIPOPTS_H__
// #define LWIP_DEBUG 1
// #define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_ALL
// #define UDP_DEBUG LWIP_DBG_ON
// #define IP_DEBUG LWIP_DBG_ON
// #define DHCP_DEBUG LWIP_DBG_ON
// #define NETIF_DEBUG LWIP_DBG_ON
// #define ETHARP_DEBUG LWIP_DBG_ON
#define NO_SYS 1
#define SYS_LIGHTWEIGHT_PROT 0
#define LWIP_NETCONN 0
#define LWIP_SOCKET 0
// Memory options
#define MEM_ALIGNMENT 4
#define MEM_SIZE (4 * 1024)
// Pbuf options
#define PBUF_POOL_SIZE 4
#define PBUF_POOL_BUFSIZE 1524
#define MEMP_NUM_PBUF 8 // default 16
// TCP options
#define LWIP_TCP 1
#define TCP_MSS 536
#define TCP_SND_BUF (2 * TCP_MSS)
#define TCP_WND (2 * TCP_MSS)
#define TCP_QUEUE_OOSEQ 0
#define LWIP_UDP 1
#define MEMP_NUM_UDP_PCB 2 // # of concurrent UDP "connections"
#define LWIP_ICMP 1
#define LWIP_DHCP 1
#define LWIP_HTTPD 1
#define LWIP_HTTPD_FS_SUPPORT 1
#define HTTPD_USE_CUSTOM_FSDATA 1
#define LWIP_NETIF_HOSTNAME 1
#define LWIP_NETIF_LINK_CALLBACK 1
#define LWIP_NETIF_STATUS_CALLBACK 1
#define LWIP_SUPPORT_CUSTOM_PBUF 1 // for zero-copy
#define CHECKSUM_GEN_IP 1
#define CHECKSUM_GEN_UDP 1
#define CHECKSUM_GEN_TCP 1
#define CHECKSUM_CHECK_IP 1
#define CHECKSUM_CHECK_UDP 1
#define CHECKSUM_CHECK_TCP 1
#define LWIP_CHECKSUM_ON_COPY 0
#define LWIP_STATS 1
#define LINK_STATS 1
#endif /* __LWIPOPTS_H__ */