Statistics
| Branch: | Tag: | Revision:

mongoose / examples / NXP_LPC4088 / LPCXpresso / Mongoose_LPC4088_QSB_BM / example / inc / lwipopts.h @ eaef5bd1

History | View | Annotate | Download (4.66 KB)

1
/* clang-format off */
2
/*
3
 * @brief LWIP build option override file
4
 *
5
 * @note
6
 * Copyright(C) NXP Semiconductors, 2012
7
 * All rights reserved.
8
 *
9
 * @par
10
 * Software that is described herein is for illustrative purposes only
11
 * which provides customers with programming information regarding the
12
 * LPC products.  This software is supplied "AS IS" without any warranties of
13
 * any kind, and NXP Semiconductors and its licensor disclaim any and
14
 * all warranties, express or implied, including all implied warranties of
15
 * merchantability, fitness for a particular purpose and non-infringement of
16
 * intellectual property rights.  NXP Semiconductors assumes no responsibility
17
 * or liability for the use of the software, conveys no license or rights under any
18
 * patent, copyright, mask work right, or any other intellectual property rights in
19
 * or to any products. NXP Semiconductors reserves the right to make changes
20
 * in the software without notification. NXP Semiconductors also makes no
21
 * representation or warranty that such application will be suitable for the
22
 * specified use without further testing or modification.
23
 *
24
 * @par
25
 * Permission to use, copy, modify, and distribute this software and its
26
 * documentation is hereby granted, under NXP Semiconductors' and its
27
 * licensor's relevant copyrights in the software, without fee, provided that it
28
 * is used in conjunction with NXP Semiconductors microcontrollers.  This
29
 * copyright, permission, and disclaimer notice must appear in all copies of
30
 * this code.
31
 */
32

    
33
#ifndef __LWIPOPTS_H_
34
#define __LWIPOPTS_H_
35

    
36
/* Standalone build */
37
#define NO_SYS                          1
38

    
39
//#define LWIP_DEBUG                        1
40
#define LPC_TX_PBUF_BOUNCE_EN        1
41
//#define HTTPD_DEBUG         LWIP_DBG_ON
42

    
43
/* Use LWIP timers */
44
#define NO_SYS_NO_TIMERS                0
45

    
46
#define LWIP_HTTPD_DYNAMIC_HEADERS      1
47

    
48
/* Need for memory protection */
49
#define SYS_LIGHTWEIGHT_PROT            0
50

    
51
/* 32-bit alignment */
52
#define MEM_ALIGNMENT                   4
53

    
54
/* pbuf buffers in pool. In zero-copy mode, these buffers are
55
   located in peripheral RAM. In copied mode, they are located in
56
   internal IRAM */
57
#define PBUF_POOL_SIZE                  7
58

    
59
/* No padding needed */
60
#define ETH_PAD_SIZE                    0
61

    
62
#define IP_SOF_BROADCAST                1
63
#define IP_SOF_BROADCAST_RECV           1
64

    
65
/* The ethernet FCS is performed in hardware. The IP, TCP, and UDP
66
   CRCs still need to be done in hardware. */
67
#define CHECKSUM_GEN_IP                 1
68
#define CHECKSUM_GEN_UDP                1
69
#define CHECKSUM_GEN_TCP                1
70
#define CHECKSUM_CHECK_IP               1
71
#define CHECKSUM_CHECK_UDP              1
72
#define CHECKSUM_CHECK_TCP              1
73
#define LWIP_CHECKSUM_ON_COPY           1
74

    
75
/* Use LWIP version of htonx() to allow generic functionality across
76
   all platforms. If you are using the Cortex Mx devices, you might
77
   be able to use the Cortex __rev instruction instead. */
78
#define LWIP_PLATFORM_BYTESWAP          0
79

    
80
/* Non-static memory, used with DMA pool */
81
#define MEM_SIZE                        (12 * 1024)
82

    
83
/* Raw interface not needed */
84
#define LWIP_RAW                        1
85

    
86
/* DHCP is ok, UDP is required with DHCP */
87
#define LWIP_DHCP                       1
88
#define LWIP_UDP                        1
89

    
90
/* Hostname can be used */
91
#define LWIP_NETIF_HOSTNAME             1
92

    
93
#define LWIP_BROADCAST_PING             1
94

    
95
/* MSS should match the hardware packet size */
96
#define TCP_MSS                         1460
97
#define TCP_SND_BUF                     (2 * TCP_MSS)
98

    
99
#define LWIP_SOCKET                     0
100
#define LWIP_NETCONN                    0
101
#define MEMP_NUM_SYS_TIMEOUT            300
102

    
103
#define LWIP_STATS                      0
104
#define LINK_STATS                      0
105
#define LWIP_STATS_DISPLAY              0
106

    
107
/* There are more *_DEBUG options that can be selected.
108
   See opts.h. Make sure that LWIP_DEBUG is defined when
109
   building the code to use debug. */
110
#define TCP_DEBUG                       LWIP_DBG_OFF
111
#define ETHARP_DEBUG                    LWIP_DBG_OFF
112
#define PBUF_DEBUG                      LWIP_DBG_OFF
113
#define IP_DEBUG                        LWIP_DBG_OFF
114
#define TCPIP_DEBUG                     LWIP_DBG_OFF
115
#define DHCP_DEBUG                      LWIP_DBG_OFF
116
#define UDP_DEBUG                       LWIP_DBG_OFF
117

    
118
/* This define is custom for the LPC EMAC driver. Enabled it to
119
   get debug messages for the driver. */
120
#define EMAC_DEBUG                    LWIP_DBG_OFF
121

    
122
#define MEM_LIBC_MALLOC                 1
123
#define MEMP_MEM_MALLOC                 1
124

    
125
/* Needed for malloc/free */
126
#include <stdlib.h>
127

    
128
#endif /* __LWIPOPTS_H_ */