|
105 | 105 |
|
106 | 106 | #define LWIP_RAM_HEAP_POINTER lwip_ram_heap |
107 | 107 |
|
| 108 | +// Number of pool pbufs. |
| 109 | +// Each requires 684 bytes of RAM. |
| 110 | +#ifndef PBUF_POOL_SIZE |
108 | 111 | #define PBUF_POOL_SIZE 5 |
| 112 | +#endif |
| 113 | + |
| 114 | +// One tcp_pcb_listen is needed for each TCPServer. |
| 115 | +// Each requires 72 bytes of RAM. |
| 116 | +#ifdef MBED_CONF_LWIP_TCP_SERVER_MAX |
| 117 | +#define MEMP_NUM_TCP_PCB_LISTEN MBED_CONF_LWIP_TCP_SERVER_MAX |
| 118 | +#else |
109 | 119 | #define MEMP_NUM_TCP_PCB_LISTEN 4 |
| 120 | +#endif |
| 121 | + |
| 122 | +// One is tcp_pcb needed for each TCPSocket. |
| 123 | +// Each requires 196 bytes of RAM. |
| 124 | +#ifdef MBED_CONF_LWIP_TCP_SOCKET_MAX |
| 125 | +#define MEMP_NUM_TCP_PCB MBED_CONF_LWIP_TCP_SOCKET_MAX |
| 126 | +#else |
110 | 127 | #define MEMP_NUM_TCP_PCB 4 |
| 128 | +#endif |
| 129 | + |
| 130 | +// One udp_pcb is needed for each UDPSocket. |
| 131 | +// Each requires 84 bytes of RAM (total rounded to multiple of 512). |
| 132 | +#ifdef MBED_CONF_LWIP_UDP_SOCKET_MAX |
| 133 | +#define MEMP_NUM_UDP_PCB MBED_CONF_LWIP_UDP_SOCKET_MAX |
| 134 | +#else |
111 | 135 | #define MEMP_NUM_UDP_PCB 4 |
| 136 | +#endif |
| 137 | + |
| 138 | +// Number of non-pool pbufs. |
| 139 | +// Each requires 92 bytes of RAM. |
| 140 | +#ifndef MEMP_NUM_PBUF |
112 | 141 | #define MEMP_NUM_PBUF 8 |
| 142 | +#endif |
| 143 | + |
| 144 | +// Each netbuf requires 64 bytes of RAM. |
| 145 | +#ifndef MEMP_NUM_NETBUF |
113 | 146 | #define MEMP_NUM_NETBUF 8 |
| 147 | +#endif |
| 148 | + |
| 149 | +// One netconn is needed for each UDPSocket, TCPSocket or TCPServer. |
| 150 | +// Each requires 236 bytes of RAM (total rounded to multiple of 512). |
| 151 | +#ifdef MBED_CONF_LWIP_SOCKET_MAX |
| 152 | +#define MEMP_NUM_NETCONN MBED_CONF_LWIP_SOCKET_MAX |
| 153 | +#else |
| 154 | +#define MEMP_NUM_NETCONN 4 |
| 155 | +#endif |
114 | 156 |
|
115 | 157 | #define TCP_QUEUE_OOSEQ 0 |
116 | 158 | #define TCP_OVERSIZE 0 |
|
0 commit comments