|
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. |
108 | 110 | #ifndef PBUF_POOL_SIZE
|
109 |
| -/// Each requires 684 bytes of RAM. |
110 | 111 | #define PBUF_POOL_SIZE 5
|
111 | 112 | #endif
|
112 |
| -#ifndef MEMP_NUM_TCP_PCB_LISTEN |
113 |
| -/// One is needed for each TCPServer. |
114 |
| -/// Each requires 72 bytes of RAM. |
| 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 |
115 | 119 | #define MEMP_NUM_TCP_PCB_LISTEN 4
|
116 | 120 | #endif
|
117 |
| -#ifndef MEMP_NUM_TCP_PCB |
118 |
| -/// One is needed for each TCPSocket. |
119 |
| -/// Each requires 196 bytes of RAM. |
| 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 |
120 | 127 | #define MEMP_NUM_TCP_PCB 4
|
121 | 128 | #endif
|
122 |
| -#ifndef MEMP_NUM_UDP_PCB |
123 |
| -/// One is needed for each UDPSocket. |
124 |
| -/// Each requires 84 bytes of RAM (rounded to multiple of 512). |
| 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 |
125 | 135 | #define MEMP_NUM_UDP_PCB 4
|
126 | 136 | #endif
|
| 137 | + |
| 138 | +// Number of non-pool pbufs. |
| 139 | +// Each requires 92 bytes of RAM. |
127 | 140 | #ifndef MEMP_NUM_PBUF
|
128 |
| -/// Each requires 92 bytes of RAM. |
129 | 141 | #define MEMP_NUM_PBUF 8
|
130 | 142 | #endif
|
| 143 | + |
| 144 | +// Each netbuf requires 64 bytes of RAM. |
131 | 145 | #ifndef MEMP_NUM_NETBUF
|
132 |
| -/// Each requires 64 bytes of RAM. |
133 | 146 | #define MEMP_NUM_NETBUF 8
|
134 | 147 | #endif
|
135 |
| -#ifndef MEMP_NUM_NETCONN |
136 |
| -/// One netconn is needed for each UDPSocket, TCPSocket or TCPServer. |
137 |
| -/// Each requires 236 bytes of RAM (rounded to multiple of 512). |
| 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 |
138 | 154 | #define MEMP_NUM_NETCONN 4
|
139 | 155 | #endif
|
140 | 156 |
|
|
0 commit comments