You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

lwipopts.h 3.3KB

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