INF2004-Project v0.1
 
Loading...
Searching...
No Matches
lwipopts_examples_common.h
1#ifndef _LWIPOPTS_EXAMPLE_COMMONH_H
2#define _LWIPOPTS_EXAMPLE_COMMONH_H
3
4
5// Common settings used in most of the pico_w examples
6// (see https://www.nongnu.org/lwip/2_1_x/group__lwip__opts.html for details)
7
8// allow override in some examples
9#ifndef NO_SYS
10#define NO_SYS 1
11#endif
12// allow override in some examples
13#ifndef LWIP_SOCKET
14#define LWIP_SOCKET 0
15#endif
16#if PICO_CYW43_ARCH_POLL
17#define MEM_LIBC_MALLOC 1
18#else
19// MEM_LIBC_MALLOC is incompatible with non polling versions
20#define MEM_LIBC_MALLOC 0
21#endif
22#define MEM_ALIGNMENT 4
23#define MEM_SIZE 4000
24#define MEMP_NUM_TCP_SEG 32
25#define MEMP_NUM_ARP_QUEUE 10
26#define PBUF_POOL_SIZE 24
27#define LWIP_ARP 1
28#define LWIP_ETHERNET 1
29#define LWIP_ICMP 1
30#define LWIP_RAW 1
31#define TCP_WND (8 * TCP_MSS)
32#define TCP_MSS 1460
33#define TCP_SND_BUF (8 * TCP_MSS)
34#define TCP_SND_QUEUELEN ((4 * (TCP_SND_BUF) + (TCP_MSS - 1)) / (TCP_MSS))
35#define LWIP_NETIF_STATUS_CALLBACK 1
36#define LWIP_NETIF_LINK_CALLBACK 1
37#define LWIP_NETIF_HOSTNAME 1
38#define LWIP_NETCONN 0
39#define MEM_STATS 0
40#define SYS_STATS 0
41#define MEMP_STATS 0
42#define LINK_STATS 0
43// #define ETH_PAD_SIZE 2
44#define LWIP_CHKSUM_ALGORITHM 3
45#define LWIP_DHCP 1
46#define LWIP_IPV4 1
47#define LWIP_TCP 1
48#define LWIP_UDP 1
49#define LWIP_DNS 1
50#define LWIP_TCP_KEEPALIVE 1
51#define LWIP_NETIF_TX_SINGLE_PBUF 1
52#define DHCP_DOES_ARP_CHECK 0
53#define LWIP_DHCP_DOES_ACD_CHECK 0
54
55#ifndef NDEBUG
56#define LWIP_DEBUG 1
57#define LWIP_STATS 1
58#define LWIP_STATS_DISPLAY 1
59#endif
60
61#define ETHARP_DEBUG LWIP_DBG_OFF
62#define NETIF_DEBUG LWIP_DBG_OFF
63#define PBUF_DEBUG LWIP_DBG_OFF
64#define API_LIB_DEBUG LWIP_DBG_OFF
65#define API_MSG_DEBUG LWIP_DBG_OFF
66#define SOCKETS_DEBUG LWIP_DBG_OFF
67#define ICMP_DEBUG LWIP_DBG_OFF
68#define INET_DEBUG LWIP_DBG_OFF
69#define IP_DEBUG LWIP_DBG_OFF
70#define IP_REASS_DEBUG LWIP_DBG_OFF
71#define RAW_DEBUG LWIP_DBG_OFF
72#define MEM_DEBUG LWIP_DBG_OFF
73#define MEMP_DEBUG LWIP_DBG_OFF
74#define SYS_DEBUG LWIP_DBG_OFF
75#define TCP_DEBUG LWIP_DBG_OFF
76#define TCP_INPUT_DEBUG LWIP_DBG_OFF
77#define TCP_OUTPUT_DEBUG LWIP_DBG_OFF
78#define TCP_RTO_DEBUG LWIP_DBG_OFF
79#define TCP_CWND_DEBUG LWIP_DBG_OFF
80#define TCP_WND_DEBUG LWIP_DBG_OFF
81#define TCP_FR_DEBUG LWIP_DBG_OFF
82#define TCP_QLEN_DEBUG LWIP_DBG_OFF
83#define TCP_RST_DEBUG LWIP_DBG_OFF
84#define UDP_DEBUG LWIP_DBG_OFF
85#define TCPIP_DEBUG LWIP_DBG_OFF
86#define PPP_DEBUG LWIP_DBG_OFF
87#define SLIP_DEBUG LWIP_DBG_OFF
88#define DHCP_DEBUG LWIP_DBG_OFF
89
90#endif /* __LWIPOPTS_H__ */