Ethernet for Nucleo and Disco board STM32F746 works with gcc and arm. IAC is untested
Fork of F7_Ethernet by
lwip/net/net_decl_lwip.h@0:d26c1b55cfca, 2016-06-19 (annotated)
- Committer:
- DieterGraef
- Date:
- Sun Jun 19 16:23:40 2016 +0000
- Revision:
- 0:d26c1b55cfca
Ethernet Library for Nucleo stm32f746ZG and Disco stm32f746NG works under arm and gcc environment
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
DieterGraef | 0:d26c1b55cfca | 1 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
DieterGraef | 0:d26c1b55cfca | 2 | // Copyright (c) Microsoft Corporation. All rights reserved. |
DieterGraef | 0:d26c1b55cfca | 3 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
DieterGraef | 0:d26c1b55cfca | 4 | |
DieterGraef | 0:d26c1b55cfca | 5 | #ifndef _NET_DECL_LWIP_H_ |
DieterGraef | 0:d26c1b55cfca | 6 | #define _NET_DECL_LWIP_H_ |
DieterGraef | 0:d26c1b55cfca | 7 | |
DieterGraef | 0:d26c1b55cfca | 8 | #ifndef TCPIP_LWIP |
DieterGraef | 0:d26c1b55cfca | 9 | #include <lwip_selector.h> |
DieterGraef | 0:d26c1b55cfca | 10 | #endif |
DieterGraef | 0:d26c1b55cfca | 11 | |
DieterGraef | 0:d26c1b55cfca | 12 | #ifndef TCPIP_LWIP |
DieterGraef | 0:d26c1b55cfca | 13 | #error Only include net_decl_lwip.h when using LWIP stack |
DieterGraef | 0:d26c1b55cfca | 14 | #endif |
DieterGraef | 0:d26c1b55cfca | 15 | |
DieterGraef | 0:d26c1b55cfca | 16 | #include "network_defines_lwip.h" |
DieterGraef | 0:d26c1b55cfca | 17 | |
DieterGraef | 0:d26c1b55cfca | 18 | #define NO_SYS 0 |
DieterGraef | 0:d26c1b55cfca | 19 | #define ERRNO 1 |
DieterGraef | 0:d26c1b55cfca | 20 | |
DieterGraef | 0:d26c1b55cfca | 21 | |
DieterGraef | 0:d26c1b55cfca | 22 | #ifdef PLATFORM_DEPENDENT__MEM_SIZE |
DieterGraef | 0:d26c1b55cfca | 23 | #define MEM_SIZE PLATFORM_DEPENDENT__MEM_SIZE |
DieterGraef | 0:d26c1b55cfca | 24 | #else |
DieterGraef | 0:d26c1b55cfca | 25 | #define MEM_SIZE MEM_SIZE__default |
DieterGraef | 0:d26c1b55cfca | 26 | #endif |
DieterGraef | 0:d26c1b55cfca | 27 | |
DieterGraef | 0:d26c1b55cfca | 28 | #ifdef PLATFORM_DEPENDENT__MEMP_NUM_PBUF |
DieterGraef | 0:d26c1b55cfca | 29 | #define MEMP_NUM_PBUF PLATFORM_DEPENDENT__MEMP_NUM_PBUF |
DieterGraef | 0:d26c1b55cfca | 30 | #else |
DieterGraef | 0:d26c1b55cfca | 31 | #define MEMP_NUM_PBUF MEMP_NUM_PBUF__default |
DieterGraef | 0:d26c1b55cfca | 32 | #endif |
DieterGraef | 0:d26c1b55cfca | 33 | |
DieterGraef | 0:d26c1b55cfca | 34 | #ifdef PLATFORM_DEPENDENT__MEMP_NUM_UDP_PCB |
DieterGraef | 0:d26c1b55cfca | 35 | #define MEMP_NUM_UDP_PCB PLATFORM_DEPENDENT__MEMP_NUM_UDP_PCB |
DieterGraef | 0:d26c1b55cfca | 36 | #else |
DieterGraef | 0:d26c1b55cfca | 37 | #define MEMP_NUM_UDP_PCB MEMP_NUM_UDP_PCB__default |
DieterGraef | 0:d26c1b55cfca | 38 | #endif |
DieterGraef | 0:d26c1b55cfca | 39 | |
DieterGraef | 0:d26c1b55cfca | 40 | #ifdef PLATFORM_DEPENDENT__MEMP_NUM_TCP_PCB |
DieterGraef | 0:d26c1b55cfca | 41 | #define MEMP_NUM_TCP_PCB PLATFORM_DEPENDENT__MEMP_NUM_TCP_PCB |
DieterGraef | 0:d26c1b55cfca | 42 | #else |
DieterGraef | 0:d26c1b55cfca | 43 | #define MEMP_NUM_TCP_PCB MEMP_NUM_TCP_PCB__default |
DieterGraef | 0:d26c1b55cfca | 44 | #endif |
DieterGraef | 0:d26c1b55cfca | 45 | |
DieterGraef | 0:d26c1b55cfca | 46 | #ifdef PLATFORM_DEPENDENT__MEMP_NUM_TCP_PCB_LISTEN |
DieterGraef | 0:d26c1b55cfca | 47 | #define MEMP_NUM_TCP_PCB_LISTEN PLATFORM_DEPENDENT__MEMP_NUM_TCP_PCB_LISTEN |
DieterGraef | 0:d26c1b55cfca | 48 | #else |
DieterGraef | 0:d26c1b55cfca | 49 | #define MEMP_NUM_TCP_PCB_LISTEN MEMP_NUM_TCP_PCB_LISTEN__default |
DieterGraef | 0:d26c1b55cfca | 50 | #endif |
DieterGraef | 0:d26c1b55cfca | 51 | |
DieterGraef | 0:d26c1b55cfca | 52 | #ifdef PLATFORM_DEPENDENT__MEMP_NUM_TCP_SEG |
DieterGraef | 0:d26c1b55cfca | 53 | #define MEMP_NUM_TCP_SEG PLATFORM_DEPENDENT__MEMP_NUM_TCP_SEG |
DieterGraef | 0:d26c1b55cfca | 54 | #else |
DieterGraef | 0:d26c1b55cfca | 55 | #define MEMP_NUM_TCP_SEG MEMP_NUM_TCP_SEG__default |
DieterGraef | 0:d26c1b55cfca | 56 | #endif |
DieterGraef | 0:d26c1b55cfca | 57 | |
DieterGraef | 0:d26c1b55cfca | 58 | #ifdef PLATFORM_DEPENDENT__MEMP_NUM_SYS_TIMEOUT |
DieterGraef | 0:d26c1b55cfca | 59 | #define MEMP_NUM_SYS_TIMEOUT PLATFORM_DEPENDENT__MEMP_NUM_SYS_TIMEOUT |
DieterGraef | 0:d26c1b55cfca | 60 | #else |
DieterGraef | 0:d26c1b55cfca | 61 | #define MEMP_NUM_SYS_TIMEOUT MEMP_NUM_SYS_TIMEOUT__default |
DieterGraef | 0:d26c1b55cfca | 62 | #endif |
DieterGraef | 0:d26c1b55cfca | 63 | |
DieterGraef | 0:d26c1b55cfca | 64 | #ifdef PLATFORM_DEPENDENT__MEMP_NUM_NETBUF |
DieterGraef | 0:d26c1b55cfca | 65 | #define MEMP_NUM_NETBUF PLATFORM_DEPENDENT__MEMP_NUM_NETBUF |
DieterGraef | 0:d26c1b55cfca | 66 | #else |
DieterGraef | 0:d26c1b55cfca | 67 | #define MEMP_NUM_NETBUF MEMP_NUM_NETBUF__default |
DieterGraef | 0:d26c1b55cfca | 68 | #endif |
DieterGraef | 0:d26c1b55cfca | 69 | |
DieterGraef | 0:d26c1b55cfca | 70 | #ifdef PLATFORM_DEPENDENT__MEMP_NUM_NETCONN |
DieterGraef | 0:d26c1b55cfca | 71 | #define MEMP_NUM_NETCONN PLATFORM_DEPENDENT__MEMP_NUM_NETCONN |
DieterGraef | 0:d26c1b55cfca | 72 | #else |
DieterGraef | 0:d26c1b55cfca | 73 | #define MEMP_NUM_NETCONN MEMP_NUM_NETCONN__default |
DieterGraef | 0:d26c1b55cfca | 74 | #endif |
DieterGraef | 0:d26c1b55cfca | 75 | |
DieterGraef | 0:d26c1b55cfca | 76 | #ifdef PLATFORM_DEPENDENT__PBUF_POOL_SIZE |
DieterGraef | 0:d26c1b55cfca | 77 | #define PBUF_POOL_SIZE PLATFORM_DEPENDENT__PBUF_POOL_SIZE |
DieterGraef | 0:d26c1b55cfca | 78 | #else |
DieterGraef | 0:d26c1b55cfca | 79 | #define PBUF_POOL_SIZE PBUF_POOL_SIZE__default |
DieterGraef | 0:d26c1b55cfca | 80 | #endif |
DieterGraef | 0:d26c1b55cfca | 81 | |
DieterGraef | 0:d26c1b55cfca | 82 | #ifdef PLATFORM_DEPENDENT__PBUF_POOL_BUFSIZE |
DieterGraef | 0:d26c1b55cfca | 83 | #define PBUF_POOL_BUFSIZE PLATFORM_DEPENDENT__PBUF_POOL_BUFSIZE |
DieterGraef | 0:d26c1b55cfca | 84 | #else |
DieterGraef | 0:d26c1b55cfca | 85 | #define PBUF_POOL_BUFSIZE PBUF_POOL_BUFSIZE__default |
DieterGraef | 0:d26c1b55cfca | 86 | #endif |
DieterGraef | 0:d26c1b55cfca | 87 | |
DieterGraef | 0:d26c1b55cfca | 88 | #ifdef PLATFORM_DEPENDENT__TCP_MSS |
DieterGraef | 0:d26c1b55cfca | 89 | #define TCP_MSS PLATFORM_DEPENDENT__TCP_MSS |
DieterGraef | 0:d26c1b55cfca | 90 | #else |
DieterGraef | 0:d26c1b55cfca | 91 | #define TCP_MSS TCP_MSS__default |
DieterGraef | 0:d26c1b55cfca | 92 | #endif |
DieterGraef | 0:d26c1b55cfca | 93 | |
DieterGraef | 0:d26c1b55cfca | 94 | #ifdef PLATFORM_DEPENDENT__TCP_SND_BUF |
DieterGraef | 0:d26c1b55cfca | 95 | #define TCP_SND_BUF PLATFORM_DEPENDENT__TCP_SND_BUF |
DieterGraef | 0:d26c1b55cfca | 96 | #else |
DieterGraef | 0:d26c1b55cfca | 97 | #define TCP_SND_BUF TCP_SND_BUF__default |
DieterGraef | 0:d26c1b55cfca | 98 | #endif |
DieterGraef | 0:d26c1b55cfca | 99 | |
DieterGraef | 0:d26c1b55cfca | 100 | #ifdef PLATFORM_DEPENDENT__TCP_SND_QUEUELEN |
DieterGraef | 0:d26c1b55cfca | 101 | #define TCP_SND_QUEUELEN PLATFORM_DEPENDENT__TCP_SND_QUEUELEN |
DieterGraef | 0:d26c1b55cfca | 102 | #else |
DieterGraef | 0:d26c1b55cfca | 103 | #define TCP_SND_QUEUELEN TCP_SND_QUEUELEN__default |
DieterGraef | 0:d26c1b55cfca | 104 | #endif |
DieterGraef | 0:d26c1b55cfca | 105 | |
DieterGraef | 0:d26c1b55cfca | 106 | #ifdef PLATFORM_DEPENDENT__TCP_WND |
DieterGraef | 0:d26c1b55cfca | 107 | #define TCP_WND PLATFORM_DEPENDENT__TCP_WND |
DieterGraef | 0:d26c1b55cfca | 108 | #else |
DieterGraef | 0:d26c1b55cfca | 109 | #define TCP_WND TCP_WND__default |
DieterGraef | 0:d26c1b55cfca | 110 | #endif |
DieterGraef | 0:d26c1b55cfca | 111 | |
DieterGraef | 0:d26c1b55cfca | 112 | #ifdef PLATFORM_DEPENDENT__TCP_SNDLOWAT |
DieterGraef | 0:d26c1b55cfca | 113 | #define TCP_SNDLOWAT PLATFORM_DEPENDENT__TCP_SNDLOWAT |
DieterGraef | 0:d26c1b55cfca | 114 | #else |
DieterGraef | 0:d26c1b55cfca | 115 | #define TCP_SNDLOWAT TCP_SNDLOWAT__default |
DieterGraef | 0:d26c1b55cfca | 116 | #endif |
DieterGraef | 0:d26c1b55cfca | 117 | |
DieterGraef | 0:d26c1b55cfca | 118 | //--// |
DieterGraef | 0:d26c1b55cfca | 119 | |
DieterGraef | 0:d26c1b55cfca | 120 | /* LWIP options that are the same for all configurations */ |
DieterGraef | 0:d26c1b55cfca | 121 | |
DieterGraef | 0:d26c1b55cfca | 122 | /* MEM_ALIGNMENT: should be set to the alignment of the CPU for which |
DieterGraef | 0:d26c1b55cfca | 123 | lwIP is compiled. 4 byte alignment -> define MEM_ALIGNMENT to 4, 2 |
DieterGraef | 0:d26c1b55cfca | 124 | byte alignment -> define MEM_ALIGNMENT to 2. */ |
DieterGraef | 0:d26c1b55cfca | 125 | #ifndef MEM_ALIGNMENT |
DieterGraef | 0:d26c1b55cfca | 126 | #define MEM_ALIGNMENT 4 |
DieterGraef | 0:d26c1b55cfca | 127 | #endif |
DieterGraef | 0:d26c1b55cfca | 128 | |
DieterGraef | 0:d26c1b55cfca | 129 | /* These two control whether reclaimer functions should be compiled |
DieterGraef | 0:d26c1b55cfca | 130 | in. Should always be turned on (1). */ |
DieterGraef | 0:d26c1b55cfca | 131 | #ifndef MEM_RECLAIM |
DieterGraef | 0:d26c1b55cfca | 132 | #define MEM_RECLAIM 1 |
DieterGraef | 0:d26c1b55cfca | 133 | #endif |
DieterGraef | 0:d26c1b55cfca | 134 | #ifndef MEMP_RECLAIM |
DieterGraef | 0:d26c1b55cfca | 135 | #define MEMP_RECLAIM 1 |
DieterGraef | 0:d26c1b55cfca | 136 | #endif |
DieterGraef | 0:d26c1b55cfca | 137 | |
DieterGraef | 0:d26c1b55cfca | 138 | #ifndef ETH_PAD_SIZE |
DieterGraef | 0:d26c1b55cfca | 139 | #define ETH_PAD_SIZE 0 |
DieterGraef | 0:d26c1b55cfca | 140 | #endif |
DieterGraef | 0:d26c1b55cfca | 141 | |
DieterGraef | 0:d26c1b55cfca | 142 | /* PBUF_LINK_HLEN: the number of bytes that should be allocated for a |
DieterGraef | 0:d26c1b55cfca | 143 | link level header. */ |
DieterGraef | 0:d26c1b55cfca | 144 | #ifndef PBUF_LINK_HLEN |
DieterGraef | 0:d26c1b55cfca | 145 | #define PBUF_LINK_HLEN (14 + ETH_PAD_SIZE) |
DieterGraef | 0:d26c1b55cfca | 146 | #endif |
DieterGraef | 0:d26c1b55cfca | 147 | |
DieterGraef | 0:d26c1b55cfca | 148 | /* ---------- TCP options ---------- */ |
DieterGraef | 0:d26c1b55cfca | 149 | #ifndef LWIP_TCP |
DieterGraef | 0:d26c1b55cfca | 150 | #define LWIP_TCP 1 |
DieterGraef | 0:d26c1b55cfca | 151 | #endif |
DieterGraef | 0:d26c1b55cfca | 152 | #ifndef TCP_TTL |
DieterGraef | 0:d26c1b55cfca | 153 | #define TCP_TTL 255 |
DieterGraef | 0:d26c1b55cfca | 154 | #endif |
DieterGraef | 0:d26c1b55cfca | 155 | |
DieterGraef | 0:d26c1b55cfca | 156 | #ifndef TCP_OVERSIZE |
DieterGraef | 0:d26c1b55cfca | 157 | #define TCP_OVERSIZE TCP_MSS |
DieterGraef | 0:d26c1b55cfca | 158 | #endif |
DieterGraef | 0:d26c1b55cfca | 159 | |
DieterGraef | 0:d26c1b55cfca | 160 | /* Controls if TCP should queue segments that arrive out of |
DieterGraef | 0:d26c1b55cfca | 161 | order. Define to 0 if your device is low on memory. */ |
DieterGraef | 0:d26c1b55cfca | 162 | #ifndef TCP_QUEUE_OOSEQ |
DieterGraef | 0:d26c1b55cfca | 163 | #define TCP_QUEUE_OOSEQ 0 |
DieterGraef | 0:d26c1b55cfca | 164 | #endif |
DieterGraef | 0:d26c1b55cfca | 165 | |
DieterGraef | 0:d26c1b55cfca | 166 | /* Maximum number of retransmissions of data segments. */ |
DieterGraef | 0:d26c1b55cfca | 167 | #ifndef TCP_MAXRTX |
DieterGraef | 0:d26c1b55cfca | 168 | #define TCP_MAXRTX 6 |
DieterGraef | 0:d26c1b55cfca | 169 | #endif |
DieterGraef | 0:d26c1b55cfca | 170 | |
DieterGraef | 0:d26c1b55cfca | 171 | /* Maximum number of retransmissions of SYN segments. */ |
DieterGraef | 0:d26c1b55cfca | 172 | #ifndef TCP_SYNMAXRTX |
DieterGraef | 0:d26c1b55cfca | 173 | #define TCP_SYNMAXRTX 4 |
DieterGraef | 0:d26c1b55cfca | 174 | #endif |
DieterGraef | 0:d26c1b55cfca | 175 | |
DieterGraef | 0:d26c1b55cfca | 176 | /* ---------- ARP options ---------- */ |
DieterGraef | 0:d26c1b55cfca | 177 | #ifndef ARP_TABLE_SIZE |
DieterGraef | 0:d26c1b55cfca | 178 | #define ARP_TABLE_SIZE 10 |
DieterGraef | 0:d26c1b55cfca | 179 | #endif |
DieterGraef | 0:d26c1b55cfca | 180 | #ifndef ARP_QUEUEING |
DieterGraef | 0:d26c1b55cfca | 181 | #define ARP_QUEUEING 0 |
DieterGraef | 0:d26c1b55cfca | 182 | #endif |
DieterGraef | 0:d26c1b55cfca | 183 | |
DieterGraef | 0:d26c1b55cfca | 184 | /* ---------- IP options ---------- */ |
DieterGraef | 0:d26c1b55cfca | 185 | /* Define IP_FORWARD to 1 if you wish to have the ability to forward |
DieterGraef | 0:d26c1b55cfca | 186 | IP packets across network interfaces. If you are going to run lwIP |
DieterGraef | 0:d26c1b55cfca | 187 | on a device with only one network interface, define this to 0. */ |
DieterGraef | 0:d26c1b55cfca | 188 | #ifndef IP_FORWARD |
DieterGraef | 0:d26c1b55cfca | 189 | #define IP_FORWARD 1 |
DieterGraef | 0:d26c1b55cfca | 190 | #endif |
DieterGraef | 0:d26c1b55cfca | 191 | |
DieterGraef | 0:d26c1b55cfca | 192 | /* If defined to 1, IP options are allowed (but not parsed). If |
DieterGraef | 0:d26c1b55cfca | 193 | defined to 0, all packets with IP options are dropped. */ |
DieterGraef | 0:d26c1b55cfca | 194 | #ifndef IP_OPTIONS |
DieterGraef | 0:d26c1b55cfca | 195 | #define IP_OPTIONS 1 |
DieterGraef | 0:d26c1b55cfca | 196 | #endif |
DieterGraef | 0:d26c1b55cfca | 197 | |
DieterGraef | 0:d26c1b55cfca | 198 | /* IP reassembly and segmentation.These are orthogonal even |
DieterGraef | 0:d26c1b55cfca | 199 | * if they both deal with IP fragments */ |
DieterGraef | 0:d26c1b55cfca | 200 | #ifndef IP_REASSEMBLY |
DieterGraef | 0:d26c1b55cfca | 201 | #define IP_REASSEMBLY 1 |
DieterGraef | 0:d26c1b55cfca | 202 | #endif |
DieterGraef | 0:d26c1b55cfca | 203 | #ifndef IP_FRAG |
DieterGraef | 0:d26c1b55cfca | 204 | #define IP_FRAG 1 |
DieterGraef | 0:d26c1b55cfca | 205 | #endif |
DieterGraef | 0:d26c1b55cfca | 206 | |
DieterGraef | 0:d26c1b55cfca | 207 | /* ---------- ICMP options ---------- */ |
DieterGraef | 0:d26c1b55cfca | 208 | #ifndef ICMP_TTL |
DieterGraef | 0:d26c1b55cfca | 209 | #define ICMP_TTL 255 |
DieterGraef | 0:d26c1b55cfca | 210 | #endif |
DieterGraef | 0:d26c1b55cfca | 211 | |
DieterGraef | 0:d26c1b55cfca | 212 | /* ---------- DHCP options ---------- */ |
DieterGraef | 0:d26c1b55cfca | 213 | /* Define LWIP_DHCP to 1 if you want DHCP configuration of |
DieterGraef | 0:d26c1b55cfca | 214 | interfaces. */ |
DieterGraef | 0:d26c1b55cfca | 215 | #ifndef LWIP_DHCP |
DieterGraef | 0:d26c1b55cfca | 216 | #define LWIP_DHCP 1 |
DieterGraef | 0:d26c1b55cfca | 217 | #endif |
DieterGraef | 0:d26c1b55cfca | 218 | |
DieterGraef | 0:d26c1b55cfca | 219 | /* 1 if you want to do an ARP check on the offered address |
DieterGraef | 0:d26c1b55cfca | 220 | (recommended). */ |
DieterGraef | 0:d26c1b55cfca | 221 | #ifndef DHCP_DOES_ARP_CHECK |
DieterGraef | 0:d26c1b55cfca | 222 | #define DHCP_DOES_ARP_CHECK 0 |
DieterGraef | 0:d26c1b55cfca | 223 | #endif |
DieterGraef | 0:d26c1b55cfca | 224 | |
DieterGraef | 0:d26c1b55cfca | 225 | /* ---------- UDP options ---------- */ |
DieterGraef | 0:d26c1b55cfca | 226 | #ifndef LWIP_UDP |
DieterGraef | 0:d26c1b55cfca | 227 | #define LWIP_UDP 1 |
DieterGraef | 0:d26c1b55cfca | 228 | #endif |
DieterGraef | 0:d26c1b55cfca | 229 | #ifndef UDP_TTL |
DieterGraef | 0:d26c1b55cfca | 230 | #define UDP_TTL 255 |
DieterGraef | 0:d26c1b55cfca | 231 | #endif |
DieterGraef | 0:d26c1b55cfca | 232 | |
DieterGraef | 0:d26c1b55cfca | 233 | /* ---------- Statistics options ---------- */ |
DieterGraef | 0:d26c1b55cfca | 234 | #ifndef LWIP_STATS |
DieterGraef | 0:d26c1b55cfca | 235 | #define LWIP_STATS 0 |
DieterGraef | 0:d26c1b55cfca | 236 | #endif |
DieterGraef | 0:d26c1b55cfca | 237 | |
DieterGraef | 0:d26c1b55cfca | 238 | /** SYS_LIGHTWEIGHT_PROT |
DieterGraef | 0:d26c1b55cfca | 239 | * define SYS_LIGHTWEIGHT_PROT in lwipopts.h if you want inter-task |
DieterGraef | 0:d26c1b55cfca | 240 | * protection for certain critical regions during buffer allocation |
DieterGraef | 0:d26c1b55cfca | 241 | * and deallocation and memory allocation and deallocation. |
DieterGraef | 0:d26c1b55cfca | 242 | */ |
DieterGraef | 0:d26c1b55cfca | 243 | #ifndef SYS_LIGHTWEIGHT_PROT |
DieterGraef | 0:d26c1b55cfca | 244 | #define SYS_LIGHTWEIGHT_PROT 1 |
DieterGraef | 0:d26c1b55cfca | 245 | #endif |
DieterGraef | 0:d26c1b55cfca | 246 | |
DieterGraef | 0:d26c1b55cfca | 247 | #ifndef LWIP_COMPAT_SOCKETS |
DieterGraef | 0:d26c1b55cfca | 248 | #define LWIP_COMPAT_SOCKETS 1 |
DieterGraef | 0:d26c1b55cfca | 249 | #endif |
DieterGraef | 0:d26c1b55cfca | 250 | |
DieterGraef | 0:d26c1b55cfca | 251 | #ifndef LWIP_PROVIDE_ERRNO |
DieterGraef | 0:d26c1b55cfca | 252 | #define LWIP_PROVIDE_ERRNO 1 |
DieterGraef | 0:d26c1b55cfca | 253 | #endif |
DieterGraef | 0:d26c1b55cfca | 254 | |
DieterGraef | 0:d26c1b55cfca | 255 | /* ---------- SNMP options ---------- */ |
DieterGraef | 0:d26c1b55cfca | 256 | #ifndef LWIP_SNMP |
DieterGraef | 0:d26c1b55cfca | 257 | #define LWIP_SNMP 0 /*LwIP 1.2.0*/ |
DieterGraef | 0:d26c1b55cfca | 258 | #endif |
DieterGraef | 0:d26c1b55cfca | 259 | #ifndef LWIP_IGMP |
DieterGraef | 0:d26c1b55cfca | 260 | #define LWIP_IGMP 1 /*LwIP 1.2.0*/ |
DieterGraef | 0:d26c1b55cfca | 261 | #endif |
DieterGraef | 0:d26c1b55cfca | 262 | |
DieterGraef | 0:d26c1b55cfca | 263 | // thread priorities are in VDK terms - 1 is highest, 30 is lowest |
DieterGraef | 0:d26c1b55cfca | 264 | #ifndef TCPIP_THREAD_PRIO |
DieterGraef | 0:d26c1b55cfca | 265 | #define TCPIP_THREAD_PRIO 5 |
DieterGraef | 0:d26c1b55cfca | 266 | #endif |
DieterGraef | 0:d26c1b55cfca | 267 | #ifndef DEFAULT_THREAD_PRIO |
DieterGraef | 0:d26c1b55cfca | 268 | #define DEFAULT_THREAD_PRIO 10 |
DieterGraef | 0:d26c1b55cfca | 269 | #endif |
DieterGraef | 0:d26c1b55cfca | 270 | #ifndef LOW_THREAD_PRIO |
DieterGraef | 0:d26c1b55cfca | 271 | #define LOW_THREAD_PRIO 29 |
DieterGraef | 0:d26c1b55cfca | 272 | #endif |
DieterGraef | 0:d26c1b55cfca | 273 | |
DieterGraef | 0:d26c1b55cfca | 274 | //--// RAM size estimate macro |
DieterGraef | 0:d26c1b55cfca | 275 | |
DieterGraef | 0:d26c1b55cfca | 276 | #if 0 // TODO - implement similar for LWIP |
DieterGraef | 0:d26c1b55cfca | 277 | #define NETWORK_RAM_SIZE_ESTIMATE() (\ |
DieterGraef | 0:d26c1b55cfca | 278 | _NETWORK_SIZEOF_NONE + \ |
DieterGraef | 0:d26c1b55cfca | 279 | NETWORK_MULTICAST_LIST_SIZE * (_NETWORK_SIZEOF_MCLISTSIZE) + \ |
DieterGraef | 0:d26c1b55cfca | 280 | NETWORK_PACKET_POOL_0__NUM_PACKETS * (NETWORK_PACKET_POOL_0__PACKET_SIZE + _NETWORK_SIZEOF_DCU) + \ |
DieterGraef | 0:d26c1b55cfca | 281 | NETWORK_PACKET_POOL_1__NUM_PACKETS * (NETWORK_PACKET_POOL_1__PACKET_SIZE + _NETWORK_SIZEOF_DCU) + \ |
DieterGraef | 0:d26c1b55cfca | 282 | NETWORK_PACKET_POOL_2__NUM_PACKETS * (NETWORK_PACKET_POOL_2__PACKET_SIZE + _NETWORK_SIZEOF_DCU) + \ |
DieterGraef | 0:d26c1b55cfca | 283 | NETWORK_PACKET_POOL_3__NUM_PACKETS * (NETWORK_PACKET_POOL_3__PACKET_SIZE + _NETWORK_SIZEOF_DCU) + \ |
DieterGraef | 0:d26c1b55cfca | 284 | NETWORK_PACKET_POOL_4__NUM_PACKETS * (NETWORK_PACKET_POOL_4__PACKET_SIZE + _NETWORK_SIZEOF_DCU) + \ |
DieterGraef | 0:d26c1b55cfca | 285 | NETWORK_PACKET_POOL_5__NUM_PACKETS * (NETWORK_PACKET_POOL_5__PACKET_SIZE + _NETWORK_SIZEOF_DCU) + \ |
DieterGraef | 0:d26c1b55cfca | 286 | _NETWORK_TOTAL_PACKET_COUNT * _NETWORK_SIZEOF_PACKET_OVERHEAD + \ |
DieterGraef | 0:d26c1b55cfca | 287 | NETWORK_NUM_IFACES * _NETWORK_SIZEOF_IFACE + \ |
DieterGraef | 0:d26c1b55cfca | 288 | NETWORK_ROUTINGTABLE_SIZE * _NETWORK_SIZEOF_ROUTINGTABLE + \ |
DieterGraef | 0:d26c1b55cfca | 289 | NETWORK_ARP_NUM_TABLE_ENTRIES * _NETWORK_SIZEOF_ARP_ENTRY + \ |
DieterGraef | 0:d26c1b55cfca | 290 | NETWORK_TCP_NUM_PORTS__SUPPORTED * _NETWORK_SIZEOF_TCPPORT + \ |
DieterGraef | 0:d26c1b55cfca | 291 | NETWORK_UDP_NUM_PORTS__SUPPORTED * _NETWORK_SIZEOF_UDPPORT + \ |
DieterGraef | 0:d26c1b55cfca | 292 | NETWORK_FRAG_TABLE_SIZE * _NETWORK_SIZEOF_FRAG_ENTRY + \ |
DieterGraef | 0:d26c1b55cfca | 293 | NETWORK_NAT_NUM_ENTRIES * _NETWORK_SIZEOF_NAT_ENTRY ) \ |
DieterGraef | 0:d26c1b55cfca | 294 | |
DieterGraef | 0:d26c1b55cfca | 295 | typedef char NETWORK_COMPILE_TIME_ASSERT[NETWORK_MEMORY_POOL__SIZE - NETWORK_RAM_SIZE_ESTIMATE()]; |
DieterGraef | 0:d26c1b55cfca | 296 | #endif |
DieterGraef | 0:d26c1b55cfca | 297 | |
DieterGraef | 0:d26c1b55cfca | 298 | #endif //_NET_DECL_LWIP_H_ |
DieterGraef | 0:d26c1b55cfca | 299 |