Give water to plants if dry amd pla meanwhile music the music vou can define with note length bind and breake also select several instruments for the sound

Dependencies:   mbed

Committer:
helmut
Date:
Wed Sep 19 14:16:56 2012 +0000
Revision:
0:5150b09127e3
plays mostly music that you can do with notes length breakes and bind; Some already defined; Tool is to start a pump for water to give plant is too dry.; Meanwhie plays music the most part of all

Who changed what in which revision?

UserRevisionLine numberNew contents of line
helmut 0:5150b09127e3 1 /*
helmut 0:5150b09127e3 2 * Copyright (c) 2001-2003 Swedish Institute of Computer Science.
helmut 0:5150b09127e3 3 * All rights reserved.
helmut 0:5150b09127e3 4 *
helmut 0:5150b09127e3 5 * Redistribution and use in source and binary forms, with or without modification,
helmut 0:5150b09127e3 6 * are permitted provided that the following conditions are met:
helmut 0:5150b09127e3 7 *
helmut 0:5150b09127e3 8 * 1. Redistributions of source code must retain the above copyright notice,
helmut 0:5150b09127e3 9 * this list of conditions and the following disclaimer.
helmut 0:5150b09127e3 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
helmut 0:5150b09127e3 11 * this list of conditions and the following disclaimer in the documentation
helmut 0:5150b09127e3 12 * and/or other materials provided with the distribution.
helmut 0:5150b09127e3 13 * 3. The name of the author may not be used to endorse or promote products
helmut 0:5150b09127e3 14 * derived from this software without specific prior written permission.
helmut 0:5150b09127e3 15 *
helmut 0:5150b09127e3 16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
helmut 0:5150b09127e3 17 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
helmut 0:5150b09127e3 18 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
helmut 0:5150b09127e3 19 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
helmut 0:5150b09127e3 20 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
helmut 0:5150b09127e3 21 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
helmut 0:5150b09127e3 22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
helmut 0:5150b09127e3 23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
helmut 0:5150b09127e3 24 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
helmut 0:5150b09127e3 25 * OF SUCH DAMAGE.
helmut 0:5150b09127e3 26 *
helmut 0:5150b09127e3 27 * This file is part of the lwIP TCP/IP stack.
helmut 0:5150b09127e3 28 *
helmut 0:5150b09127e3 29 * Author: Adam Dunkels <adam@sics.se>
helmut 0:5150b09127e3 30 *
helmut 0:5150b09127e3 31 */
helmut 0:5150b09127e3 32 #ifndef __LWIPOPTS_H__
helmut 0:5150b09127e3 33 #define __LWIPOPTS_H__
helmut 0:5150b09127e3 34
helmut 0:5150b09127e3 35 #include "netCfg.h"
helmut 0:5150b09127e3 36 #if NET_LWIP_STACK
helmut 0:5150b09127e3 37
helmut 0:5150b09127e3 38 //#include "arch/sys_arch.h"
helmut 0:5150b09127e3 39
helmut 0:5150b09127e3 40 /* <sys/time.h> is included in cc.h! */
helmut 0:5150b09127e3 41 #define LWIP_TIMEVAL_PRIVATE 0
helmut 0:5150b09127e3 42
helmut 0:5150b09127e3 43 //#define __LWIP_DEBUG
helmut 0:5150b09127e3 44 #include "dbg/dbg.h"
helmut 0:5150b09127e3 45
helmut 0:5150b09127e3 46 #ifdef __LWIP_DEBUG
helmut 0:5150b09127e3 47
helmut 0:5150b09127e3 48 #define LWIP_DEBUG 1
helmut 0:5150b09127e3 49
helmut 0:5150b09127e3 50 #define LWIP_DBG_MIN_LEVEL 0
helmut 0:5150b09127e3 51 //#define LWIP_COMPAT_SOCKETS 1
helmut 0:5150b09127e3 52 #define TAPIF_DEBUG LWIP_DBG_OFF
helmut 0:5150b09127e3 53 #define TUNIF_DEBUG LWIP_DBG_OFF
helmut 0:5150b09127e3 54 #define UNIXIF_DEBUG LWIP_DBG_OFF
helmut 0:5150b09127e3 55 #define DELIF_DEBUG LWIP_DBG_OFF
helmut 0:5150b09127e3 56 #define SIO_FIFO_DEBUG LWIP_DBG_ON
helmut 0:5150b09127e3 57 #define TCPDUMP_DEBUG LWIP_DBG_ON
helmut 0:5150b09127e3 58
helmut 0:5150b09127e3 59 #define PPP_DEBUG LWIP_DBG_OFF
helmut 0:5150b09127e3 60 #define MEM_DEBUG LWIP_DBG_OFF
helmut 0:5150b09127e3 61 #define MEMP_DEBUG LWIP_DBG_OFF
helmut 0:5150b09127e3 62 #define PBUF_DEBUG LWIP_DBG_OFF
helmut 0:5150b09127e3 63 #define API_LIB_DEBUG LWIP_DBG_OFF
helmut 0:5150b09127e3 64 #define API_MSG_DEBUG LWIP_DBG_OFF
helmut 0:5150b09127e3 65 #define TCPIP_DEBUG LWIP_DBG_OFF
helmut 0:5150b09127e3 66 #define NETIF_DEBUG LWIP_DBG_OFF
helmut 0:5150b09127e3 67 #define SOCKETS_DEBUG LWIP_DBG_OFF
helmut 0:5150b09127e3 68 #define DEMO_DEBUG LWIP_DBG_OFF
helmut 0:5150b09127e3 69 #define IP_DEBUG LWIP_DBG_OFF
helmut 0:5150b09127e3 70 #define IP_REASS_DEBUG LWIP_DBG_OFF
helmut 0:5150b09127e3 71 #define RAW_DEBUG LWIP_DBG_OFF
helmut 0:5150b09127e3 72 #define ICMP_DEBUG LWIP_DBG_OFF
helmut 0:5150b09127e3 73 #define IGMP_DEBUG LWIP_DBG_OFF
helmut 0:5150b09127e3 74 #define UDP_DEBUG LWIP_DBG_OFF
helmut 0:5150b09127e3 75 #define TCP_DEBUG LWIP_DBG_OFF
helmut 0:5150b09127e3 76 #define TCP_INPUT_DEBUG LWIP_DBG_OFF
helmut 0:5150b09127e3 77 #define TCP_OUTPUT_DEBUG LWIP_DBG_OFF
helmut 0:5150b09127e3 78 #define TCP_RTO_DEBUG LWIP_DBG_OFF
helmut 0:5150b09127e3 79 #define TCP_CWND_DEBUG LWIP_DBG_OFF
helmut 0:5150b09127e3 80 #define TCP_WND_DEBUG LWIP_DBG_OFF
helmut 0:5150b09127e3 81 #define TCP_FR_DEBUG LWIP_DBG_OFF
helmut 0:5150b09127e3 82 #define TCP_QLEN_DEBUG LWIP_DBG_OFF
helmut 0:5150b09127e3 83 #define TCP_RST_DEBUG LWIP_DBG_OFF
helmut 0:5150b09127e3 84 #define ETHARP_DEBUG LWIP_DBG_OFF
helmut 0:5150b09127e3 85 #define DNS_DEBUG LWIP_DBG_OFF
helmut 0:5150b09127e3 86
helmut 0:5150b09127e3 87 #endif
helmut 0:5150b09127e3 88
helmut 0:5150b09127e3 89 /*
helmut 0:5150b09127e3 90 extern unsigned char debug_flags;
helmut 0:5150b09127e3 91 #define LWIP_DBG_TYPES_ON debug_flags
helmut 0:5150b09127e3 92 */
helmut 0:5150b09127e3 93 #define NO_SYS 1
helmut 0:5150b09127e3 94 #define LWIP_SOCKET (NO_SYS==0)
helmut 0:5150b09127e3 95 #define LWIP_NETCONN (NO_SYS==0)
helmut 0:5150b09127e3 96
helmut 0:5150b09127e3 97
helmut 0:5150b09127e3 98 #define IP_FRAG_USES_STATIC_BUF 0
helmut 0:5150b09127e3 99
helmut 0:5150b09127e3 100
helmut 0:5150b09127e3 101
helmut 0:5150b09127e3 102 /* ---------- Memory options ---------- */
helmut 0:5150b09127e3 103 /* MEM_ALIGNMENT: should be set to the alignment of the CPU for which
helmut 0:5150b09127e3 104 lwIP is compiled. 4 byte alignment -> define MEM_ALIGNMENT to 4, 2
helmut 0:5150b09127e3 105 byte alignment -> define MEM_ALIGNMENT to 2. */
helmut 0:5150b09127e3 106 /* MSVC port: intel processors don't need 4-byte alignment,
helmut 0:5150b09127e3 107 but are faster that way! */
helmut 0:5150b09127e3 108 #define MEM_ALIGNMENT 4
helmut 0:5150b09127e3 109
helmut 0:5150b09127e3 110 /* MEM_SIZE: the size of the heap memory. If the application will send
helmut 0:5150b09127e3 111 a lot of data that needs to be copied, this should be set high. */
helmut 0:5150b09127e3 112 //#define MEM_SIZE 10240
helmut 0:5150b09127e3 113
helmut 0:5150b09127e3 114 #if TARGET_LPC1768
helmut 0:5150b09127e3 115
helmut 0:5150b09127e3 116
helmut 0:5150b09127e3 117 #define MEM_SIZE 3000 //2000
helmut 0:5150b09127e3 118
helmut 0:5150b09127e3 119 ///
helmut 0:5150b09127e3 120
helmut 0:5150b09127e3 121 #define MEM_POSITION __attribute((section("AHBSRAM0")))
helmut 0:5150b09127e3 122
helmut 0:5150b09127e3 123 /* MEMP_NUM_PBUF: the number of memp struct pbufs. If the application
helmut 0:5150b09127e3 124 sends a lot of data out of ROM (or other static memory), this
helmut 0:5150b09127e3 125 should be set high. */
helmut 0:5150b09127e3 126 #define MEMP_NUM_PBUF 16
helmut 0:5150b09127e3 127 /* MEMP_NUM_RAW_PCB: the number of UDP protocol control blocks. One
helmut 0:5150b09127e3 128 per active RAW "connection". */
helmut 0:5150b09127e3 129 //#define MEMP_NUM_RAW_PCB 3
helmut 0:5150b09127e3 130 /* MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One
helmut 0:5150b09127e3 131 per active UDP "connection". */
helmut 0:5150b09127e3 132 #define MEMP_NUM_UDP_PCB 4
helmut 0:5150b09127e3 133 /* MEMP_NUM_TCP_PCB: the number of simulatenously active TCP
helmut 0:5150b09127e3 134 connections. */
helmut 0:5150b09127e3 135 #define MEMP_NUM_TCP_PCB 3
helmut 0:5150b09127e3 136 /* MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP
helmut 0:5150b09127e3 137 connections. */
helmut 0:5150b09127e3 138 #define MEMP_NUM_TCP_PCB_LISTEN 2//4
helmut 0:5150b09127e3 139 /* MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP
helmut 0:5150b09127e3 140 segments. */
helmut 0:5150b09127e3 141 #define MEMP_NUM_TCP_SEG 16
helmut 0:5150b09127e3 142 /* MEMP_NUM_SYS_TIMEOUT: the number of simulateously active
helmut 0:5150b09127e3 143 timeouts. */
helmut 0:5150b09127e3 144 #define MEMP_NUM_SYS_TIMEOUT 12
helmut 0:5150b09127e3 145
helmut 0:5150b09127e3 146 /* The following four are used only with the sequential API and can be
helmut 0:5150b09127e3 147 set to 0 if the application only will use the raw API. */
helmut 0:5150b09127e3 148 /* MEMP_NUM_NETBUF: the number of struct netbufs. */
helmut 0:5150b09127e3 149 #define MEMP_NUM_NETBUF 0
helmut 0:5150b09127e3 150 /* MEMP_NUM_NETCONN: the number of struct netconns. */
helmut 0:5150b09127e3 151 #define MEMP_NUM_NETCONN 0
helmut 0:5150b09127e3 152 /* MEMP_NUM_TCPIP_MSG_*: the number of struct tcpip_msg, which is used
helmut 0:5150b09127e3 153 for sequential API communication and incoming packets. Used in
helmut 0:5150b09127e3 154 src/api/tcpip.c. */
helmut 0:5150b09127e3 155 #define MEMP_NUM_TCPIP_MSG_API 0
helmut 0:5150b09127e3 156 #define MEMP_NUM_TCPIP_MSG_INPKT 0
helmut 0:5150b09127e3 157
helmut 0:5150b09127e3 158 /* ---------- Pbuf options ---------- */
helmut 0:5150b09127e3 159 /* PBUF_POOL_SIZE: the number of buffers in the pbuf pool. */
helmut 0:5150b09127e3 160 #define PBUF_POOL_SIZE 8//16//100
helmut 0:5150b09127e3 161
helmut 0:5150b09127e3 162 /* PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. */
helmut 0:5150b09127e3 163 //#define PBUF_POOL_BUFSIZE 128
helmut 0:5150b09127e3 164
helmut 0:5150b09127e3 165 /* PBUF_LINK_HLEN: the number of bytes that should be allocated for a
helmut 0:5150b09127e3 166 link level header. */
helmut 0:5150b09127e3 167 //#define PBUF_LINK_HLEN 16
helmut 0:5150b09127e3 168
helmut 0:5150b09127e3 169 /** SYS_LIGHTWEIGHT_PROT
helmut 0:5150b09127e3 170 * define SYS_LIGHTWEIGHT_PROT in lwipopts.h if you want inter-task protection
helmut 0:5150b09127e3 171 * for certain critical regions during buffer allocation, deallocation and memory
helmut 0:5150b09127e3 172 * allocation and deallocation.
helmut 0:5150b09127e3 173 */
helmut 0:5150b09127e3 174 #define SYS_LIGHTWEIGHT_PROT 0 //No sys here
helmut 0:5150b09127e3 175
helmut 0:5150b09127e3 176 /* ---------- TCP options ---------- */
helmut 0:5150b09127e3 177 #define LWIP_TCP 1
helmut 0:5150b09127e3 178 //#define TCP_TTL 255
helmut 0:5150b09127e3 179
helmut 0:5150b09127e3 180 /* Controls if TCP should queue segments that arrive out of
helmut 0:5150b09127e3 181 order. Define to 0 if your device is low on memory. */
helmut 0:5150b09127e3 182 #define TCP_QUEUE_OOSEQ 1
helmut 0:5150b09127e3 183
helmut 0:5150b09127e3 184 /* TCP Maximum segment size. */
helmut 0:5150b09127e3 185 //#define TCP_MSS 1024
helmut 0:5150b09127e3 186 #define TCP_MSS 536//1024//536//0x276
helmut 0:5150b09127e3 187
helmut 0:5150b09127e3 188 /* TCP sender buffer space (bytes). */
helmut 0:5150b09127e3 189 #define TCP_SND_BUF (3 * TCP_MSS) //2048
helmut 0:5150b09127e3 190
helmut 0:5150b09127e3 191 /* TCP sender buffer space (pbufs). This must be at least = 2 *
helmut 0:5150b09127e3 192 TCP_SND_BUF/TCP_MSS for things to work. */
helmut 0:5150b09127e3 193 #define TCP_SND_QUEUELEN (4 * (TCP_SND_BUF)/(TCP_MSS))
helmut 0:5150b09127e3 194
helmut 0:5150b09127e3 195 /* TCP writable space (bytes). This must be less than or equal
helmut 0:5150b09127e3 196 to TCP_SND_BUF. It is the amount of space which must be
helmut 0:5150b09127e3 197 available in the tcp snd_buf for select to return writable */
helmut 0:5150b09127e3 198 #define TCP_SNDLOWAT ((TCP_SND_BUF)/2)
helmut 0:5150b09127e3 199
helmut 0:5150b09127e3 200 /**
helmut 0:5150b09127e3 201 * TCP_WND: The size of a TCP window. This must be at least
helmut 0:5150b09127e3 202 * (2 * TCP_MSS) for things to work well
helmut 0:5150b09127e3 203 */
helmut 0:5150b09127e3 204 /* TCP receive window. */
helmut 0:5150b09127e3 205 #define TCP_WND (4 * TCP_MSS) //8096
helmut 0:5150b09127e3 206
helmut 0:5150b09127e3 207 /* Maximum number of retransmissions of data segments. */
helmut 0:5150b09127e3 208 //#define TCP_MAXRTX 12
helmut 0:5150b09127e3 209
helmut 0:5150b09127e3 210 /* Maximum number of retransmissions of SYN segments. */
helmut 0:5150b09127e3 211 //#define TCP_SYNMAXRTX 4
helmut 0:5150b09127e3 212
helmut 0:5150b09127e3 213 #elif TARGET_LPC2368
helmut 0:5150b09127e3 214
helmut 0:5150b09127e3 215 #define MEM_POSITION __attribute((section("AHBSRAM1")))
helmut 0:5150b09127e3 216
helmut 0:5150b09127e3 217 /* MEMP_NUM_PBUF: the number of memp struct pbufs. If the application
helmut 0:5150b09127e3 218 sends a lot of data out of ROM (or other static memory), this
helmut 0:5150b09127e3 219 should be set high. */
helmut 0:5150b09127e3 220 #define MEMP_NUM_PBUF 8
helmut 0:5150b09127e3 221 /* MEMP_NUM_RAW_PCB: the number of UDP protocol control blocks. One
helmut 0:5150b09127e3 222 per active RAW "connection". */
helmut 0:5150b09127e3 223 //#define MEMP_NUM_RAW_PCB 3
helmut 0:5150b09127e3 224 /* MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One
helmut 0:5150b09127e3 225 per active UDP "connection". */
helmut 0:5150b09127e3 226 #define MEMP_NUM_UDP_PCB 2
helmut 0:5150b09127e3 227 /* MEMP_NUM_TCP_PCB: the number of simulatenously active TCP
helmut 0:5150b09127e3 228 connections. */
helmut 0:5150b09127e3 229 #define MEMP_NUM_TCP_PCB 2
helmut 0:5150b09127e3 230 /* MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP
helmut 0:5150b09127e3 231 connections. */
helmut 0:5150b09127e3 232 #define MEMP_NUM_TCP_PCB_LISTEN 2//4
helmut 0:5150b09127e3 233 /* MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP
helmut 0:5150b09127e3 234 segments. */
helmut 0:5150b09127e3 235 #define MEMP_NUM_TCP_SEG 8
helmut 0:5150b09127e3 236 /* MEMP_NUM_SYS_TIMEOUT: the number of simulateously active
helmut 0:5150b09127e3 237 timeouts. */
helmut 0:5150b09127e3 238 #define MEMP_NUM_SYS_TIMEOUT 12
helmut 0:5150b09127e3 239
helmut 0:5150b09127e3 240 /* The following four are used only with the sequential API and can be
helmut 0:5150b09127e3 241 set to 0 if the application only will use the raw API. */
helmut 0:5150b09127e3 242 /* MEMP_NUM_NETBUF: the number of struct netbufs. */
helmut 0:5150b09127e3 243 #define MEMP_NUM_NETBUF 0
helmut 0:5150b09127e3 244 /* MEMP_NUM_NETCONN: the number of struct netconns. */
helmut 0:5150b09127e3 245 #define MEMP_NUM_NETCONN 0
helmut 0:5150b09127e3 246 /* MEMP_NUM_TCPIP_MSG_*: the number of struct tcpip_msg, which is used
helmut 0:5150b09127e3 247 for sequential API communication and incoming packets. Used in
helmut 0:5150b09127e3 248 src/api/tcpip.c. */
helmut 0:5150b09127e3 249 #define MEMP_NUM_TCPIP_MSG_API 0
helmut 0:5150b09127e3 250 #define MEMP_NUM_TCPIP_MSG_INPKT 0
helmut 0:5150b09127e3 251
helmut 0:5150b09127e3 252 /* ---------- Pbuf options ---------- */
helmut 0:5150b09127e3 253 /* PBUF_POOL_SIZE: the number of buffers in the pbuf pool. */
helmut 0:5150b09127e3 254 #define PBUF_POOL_SIZE 8//16//100
helmut 0:5150b09127e3 255
helmut 0:5150b09127e3 256 /* PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. */
helmut 0:5150b09127e3 257 //#define PBUF_POOL_BUFSIZE 128
helmut 0:5150b09127e3 258
helmut 0:5150b09127e3 259 /* PBUF_LINK_HLEN: the number of bytes that should be allocated for a
helmut 0:5150b09127e3 260 link level header. */
helmut 0:5150b09127e3 261 //#define PBUF_LINK_HLEN 16
helmut 0:5150b09127e3 262
helmut 0:5150b09127e3 263 /** SYS_LIGHTWEIGHT_PROT
helmut 0:5150b09127e3 264 * define SYS_LIGHTWEIGHT_PROT in lwipopts.h if you want inter-task protection
helmut 0:5150b09127e3 265 * for certain critical regions during buffer allocation, deallocation and memory
helmut 0:5150b09127e3 266 * allocation and deallocation.
helmut 0:5150b09127e3 267 */
helmut 0:5150b09127e3 268 #define SYS_LIGHTWEIGHT_PROT 0 //No sys here
helmut 0:5150b09127e3 269
helmut 0:5150b09127e3 270 /* ---------- TCP options ---------- */
helmut 0:5150b09127e3 271 #define LWIP_TCP 1
helmut 0:5150b09127e3 272 #define TCP_TTL 255
helmut 0:5150b09127e3 273
helmut 0:5150b09127e3 274 /* Controls if TCP should queue segments that arrive out of
helmut 0:5150b09127e3 275 order. Define to 0 if your device is low on memory. */
helmut 0:5150b09127e3 276 #define TCP_QUEUE_OOSEQ 0
helmut 0:5150b09127e3 277
helmut 0:5150b09127e3 278 /* TCP Maximum segment size. */
helmut 0:5150b09127e3 279 //#define TCP_MSS 1024
helmut 0:5150b09127e3 280 #define TCP_MSS 536//0x276//536//0x276
helmut 0:5150b09127e3 281
helmut 0:5150b09127e3 282 /* TCP sender buffer space (bytes). */
helmut 0:5150b09127e3 283 #define TCP_SND_BUF (3 * TCP_MSS)
helmut 0:5150b09127e3 284
helmut 0:5150b09127e3 285 /* TCP sender buffer space (pbufs). This must be at least = 2 *
helmut 0:5150b09127e3 286 TCP_SND_BUF/TCP_MSS for things to work. */
helmut 0:5150b09127e3 287 #define TCP_SND_QUEUELEN (2 * TCP_SND_BUF/TCP_MSS)//(4 * TCP_SND_BUF/TCP_MSS)
helmut 0:5150b09127e3 288
helmut 0:5150b09127e3 289 /* TCP writable space (bytes). This must be less than or equal
helmut 0:5150b09127e3 290 to TCP_SND_BUF. It is the amount of space which must be
helmut 0:5150b09127e3 291 available in the tcp snd_buf for select to return writable */
helmut 0:5150b09127e3 292 #define TCP_SNDLOWAT (TCP_SND_BUF/2)
helmut 0:5150b09127e3 293
helmut 0:5150b09127e3 294 /* TCP receive window. */
helmut 0:5150b09127e3 295 #define TCP_WND (3 * TCP_MSS) //8096
helmut 0:5150b09127e3 296
helmut 0:5150b09127e3 297 /* Maximum number of retransmissions of data segments. */
helmut 0:5150b09127e3 298 //#define TCP_MAXRTX 12
helmut 0:5150b09127e3 299
helmut 0:5150b09127e3 300 /* Maximum number of retransmissions of SYN segments. */
helmut 0:5150b09127e3 301 //#define TCP_SYNMAXRTX 4
helmut 0:5150b09127e3 302
helmut 0:5150b09127e3 303 #endif
helmut 0:5150b09127e3 304
helmut 0:5150b09127e3 305 /* ---------- ARP options ---------- */
helmut 0:5150b09127e3 306 #define LWIP_ARP (NET_ETH | NET_ZG2100)
helmut 0:5150b09127e3 307 #define ARP_TABLE_SIZE 4//10
helmut 0:5150b09127e3 308 #define ARP_QUEUEING 0
helmut 0:5150b09127e3 309 #define ETHARP_TRUST_IP_MAC 1
helmut 0:5150b09127e3 310
helmut 0:5150b09127e3 311 /* ---------- IP options ---------- */
helmut 0:5150b09127e3 312 /* Define IP_FORWARD to 1 if you wish to have the ability to forward
helmut 0:5150b09127e3 313 IP packets across network interfaces. If you are going to run lwIP
helmut 0:5150b09127e3 314 on a device with only one network interface, define this to 0. */
helmut 0:5150b09127e3 315 #define IP_FORWARD 0
helmut 0:5150b09127e3 316
helmut 0:5150b09127e3 317
helmut 0:5150b09127e3 318 /* IP reassembly and segmentation.These are orthogonal even
helmut 0:5150b09127e3 319 * if they both deal with IP fragments */
helmut 0:5150b09127e3 320 /*
helmut 0:5150b09127e3 321 #define IP_REASSEMBLY 1
helmut 0:5150b09127e3 322 #define IP_REASS_MAX_PBUFS 10
helmut 0:5150b09127e3 323 #define MEMP_NUM_REASSDATA 10
helmut 0:5150b09127e3 324 #define IP_FRAG 1
helmut 0:5150b09127e3 325 */
helmut 0:5150b09127e3 326 /* ---------- ICMP options ---------- */
helmut 0:5150b09127e3 327 #define ICMP_TTL 255
helmut 0:5150b09127e3 328
helmut 0:5150b09127e3 329 /* ---------- IGMP options ---------- */
helmut 0:5150b09127e3 330 #define LWIP_IGMP (NET_ETH | NET_ZG2100)
helmut 0:5150b09127e3 331
helmut 0:5150b09127e3 332 /* ---------- DHCP options ---------- */
helmut 0:5150b09127e3 333 /* Define LWIP_DHCP to 1 if you want DHCP configuration of
helmut 0:5150b09127e3 334 interfaces. */
helmut 0:5150b09127e3 335 #define LWIP_DHCP (NET_ETH | NET_ZG2100)
helmut 0:5150b09127e3 336
helmut 0:5150b09127e3 337 /* 1 if you want to do an ARP check on the offered address
helmut 0:5150b09127e3 338 (recommended if using DHCP). */
helmut 0:5150b09127e3 339 #define DHCP_DOES_ARP_CHECK (LWIP_DHCP)
helmut 0:5150b09127e3 340
helmut 0:5150b09127e3 341 /* ---------- AUTOIP options ------- */
helmut 0:5150b09127e3 342 #define LWIP_AUTOIP 0
helmut 0:5150b09127e3 343
helmut 0:5150b09127e3 344 /* ---------- SNMP options ---------- */
helmut 0:5150b09127e3 345 /** @todo SNMP is experimental for now
helmut 0:5150b09127e3 346 @note UDP must be available for SNMP transport */
helmut 0:5150b09127e3 347 #ifndef LWIP_SNMP
helmut 0:5150b09127e3 348 #define LWIP_SNMP 0
helmut 0:5150b09127e3 349 #endif
helmut 0:5150b09127e3 350
helmut 0:5150b09127e3 351
helmut 0:5150b09127e3 352 #ifndef SNMP_PRIVATE_MIB
helmut 0:5150b09127e3 353 #define SNMP_PRIVATE_MIB 0
helmut 0:5150b09127e3 354 #endif
helmut 0:5150b09127e3 355
helmut 0:5150b09127e3 356
helmut 0:5150b09127e3 357 /* ---------- UDP options ---------- */
helmut 0:5150b09127e3 358 #define LWIP_UDP 1
helmut 0:5150b09127e3 359 #define UDP_TTL 255
helmut 0:5150b09127e3 360
helmut 0:5150b09127e3 361 /* ---------- DNS options ---------- */
helmut 0:5150b09127e3 362 #define LWIP_DNS 1
helmut 0:5150b09127e3 363
helmut 0:5150b09127e3 364 /* ---------- RAW options ---------- */
helmut 0:5150b09127e3 365 #define LWIP_RAW 0
helmut 0:5150b09127e3 366 #define RAW_TTL 255
helmut 0:5150b09127e3 367
helmut 0:5150b09127e3 368 /* ---------- Statistics options ---------- */
helmut 0:5150b09127e3 369 /* individual STATS options can be turned off by defining them to 0
helmut 0:5150b09127e3 370 * (e.g #define TCP_STATS 0). All of them are turned off if LWIP_STATS
helmut 0:5150b09127e3 371 * is 0
helmut 0:5150b09127e3 372 * */
helmut 0:5150b09127e3 373
helmut 0:5150b09127e3 374 #define LWIP_STATS 0
helmut 0:5150b09127e3 375
helmut 0:5150b09127e3 376 /* ---------- PPP options ---------- */
helmut 0:5150b09127e3 377
helmut 0:5150b09127e3 378 #define PPP_SUPPORT NET_PPP /* Set > 0 for PPP */
helmut 0:5150b09127e3 379
helmut 0:5150b09127e3 380 #if PPP_SUPPORT > 0
helmut 0:5150b09127e3 381
helmut 0:5150b09127e3 382 #define NUM_PPP 1 /* Max PPP sessions. */
helmut 0:5150b09127e3 383
helmut 0:5150b09127e3 384
helmut 0:5150b09127e3 385 /* Select modules to enable. Ideally these would be set in the makefile but
helmut 0:5150b09127e3 386 * we're limited by the command line length so you need to modify the settings
helmut 0:5150b09127e3 387 * in this file.
helmut 0:5150b09127e3 388 */
helmut 0:5150b09127e3 389 #define PAP_SUPPORT 1 /* Set > 0 for PAP. */
helmut 0:5150b09127e3 390 #define CHAP_SUPPORT 1 /* Set > 0 for CHAP. */
helmut 0:5150b09127e3 391 #define MSCHAP_SUPPORT 0 /* Set > 0 for MSCHAP (NOT FUNCTIONAL!) */
helmut 0:5150b09127e3 392 #define CBCP_SUPPORT 0 /* Set > 0 for CBCP (NOT FUNCTIONAL!) */
helmut 0:5150b09127e3 393 #define CCP_SUPPORT 0 /* Set > 0 for CCP (NOT FUNCTIONAL!) */
helmut 0:5150b09127e3 394 #define VJ_SUPPORT 1 /* Set > 0 for VJ header compression. */
helmut 0:5150b09127e3 395 #define MD5_SUPPORT 1 /* Set > 0 for MD5 (see also CHAP) */
helmut 0:5150b09127e3 396
helmut 0:5150b09127e3 397
helmut 0:5150b09127e3 398 /*
helmut 0:5150b09127e3 399 * Timeouts.
helmut 0:5150b09127e3 400 */
helmut 0:5150b09127e3 401 #define FSM_DEFTIMEOUT 6 /* Timeout time in seconds */
helmut 0:5150b09127e3 402 #define FSM_DEFMAXTERMREQS 2 /* Maximum Terminate-Request transmissions */
helmut 0:5150b09127e3 403 #define FSM_DEFMAXCONFREQS 10 /* Maximum Configure-Request transmissions */
helmut 0:5150b09127e3 404 #define FSM_DEFMAXNAKLOOPS 5 /* Maximum number of nak loops */
helmut 0:5150b09127e3 405
helmut 0:5150b09127e3 406 #define UPAP_DEFTIMEOUT 6 /* Timeout (seconds) for retransmitting req */
helmut 0:5150b09127e3 407 #define UPAP_DEFREQTIME 30 /* Time to wait for auth-req from peer */
helmut 0:5150b09127e3 408
helmut 0:5150b09127e3 409 #define CHAP_DEFTIMEOUT 6 /* Timeout time in seconds */
helmut 0:5150b09127e3 410 #define CHAP_DEFTRANSMITS 10 /* max # times to send challenge */
helmut 0:5150b09127e3 411
helmut 0:5150b09127e3 412
helmut 0:5150b09127e3 413 /* Interval in seconds between keepalive echo requests, 0 to disable. */
helmut 0:5150b09127e3 414 #if 1
helmut 0:5150b09127e3 415 #define LCP_ECHOINTERVAL 0
helmut 0:5150b09127e3 416 #else
helmut 0:5150b09127e3 417
helmut 0:5150b09127e3 418 #define LCP_ECHOINTERVAL 10
helmut 0:5150b09127e3 419 #endif
helmut 0:5150b09127e3 420
helmut 0:5150b09127e3 421
helmut 0:5150b09127e3 422 /* Number of unanswered echo requests before failure. */
helmut 0:5150b09127e3 423 #define LCP_MAXECHOFAILS 3
helmut 0:5150b09127e3 424
helmut 0:5150b09127e3 425 /* Max Xmit idle time (in jiffies) before resend flag char. */
helmut 0:5150b09127e3 426 #define PPP_MAXIDLEFLAG 0//Send it every time//100
helmut 0:5150b09127e3 427
helmut 0:5150b09127e3 428 /*
helmut 0:5150b09127e3 429 * Packet sizes
helmut 0:5150b09127e3 430 *
helmut 0:5150b09127e3 431 * Note - lcp shouldn't be allowed to negotiate stuff outside these
helmut 0:5150b09127e3 432 * limits. See lcp.h in the pppd directory.
helmut 0:5150b09127e3 433 * (XXX - these constants should simply be shared by lcp.c instead
helmut 0:5150b09127e3 434 * of living in lcp.h)
helmut 0:5150b09127e3 435 */
helmut 0:5150b09127e3 436 #define PPP_MTU 1500 /* Default MTU (size of Info field) */
helmut 0:5150b09127e3 437 #if 0
helmut 0:5150b09127e3 438 #define PPP_MAXMTU 65535 - (PPP_HDRLEN + PPP_FCSLEN)
helmut 0:5150b09127e3 439 #else
helmut 0:5150b09127e3 440
helmut 0:5150b09127e3 441 #define PPP_MAXMTU 1500 /* Largest MTU we allow */
helmut 0:5150b09127e3 442 #endif
helmut 0:5150b09127e3 443
helmut 0:5150b09127e3 444 #define PPP_MINMTU 64
helmut 0:5150b09127e3 445 #define PPP_MRU 1500 /* default MRU = max length of info field */
helmut 0:5150b09127e3 446 #define PPP_MAXMRU 1500 /* Largest MRU we allow */
helmut 0:5150b09127e3 447 #define PPP_DEFMRU 296 /* Try for this */
helmut 0:5150b09127e3 448 #define PPP_MINMRU 128 /* No MRUs below this */
helmut 0:5150b09127e3 449
helmut 0:5150b09127e3 450
helmut 0:5150b09127e3 451 #define MAXNAMELEN 64 /* max length of hostname or name for auth */
helmut 0:5150b09127e3 452 #define MAXSECRETLEN 64 /* max length of password or secret */
helmut 0:5150b09127e3 453
helmut 0:5150b09127e3 454 #endif /* PPP_SUPPORT > 0 */
helmut 0:5150b09127e3 455
helmut 0:5150b09127e3 456 //C++ Compat
helmut 0:5150b09127e3 457 #define try vTry
helmut 0:5150b09127e3 458
helmut 0:5150b09127e3 459 #endif
helmut 0:5150b09127e3 460
helmut 0:5150b09127e3 461
helmut 0:5150b09127e3 462 #endif /* __LWIPOPTS_H__ */