Skip to content

Commit f2d573f

Browse files
committed
update lwip2 include files (now stable-2.0.3) + fix typedef lwip_err_t (get it from arduino's sdk lwip1.4)
1 parent 2b177cb commit f2d573f

File tree

10 files changed

+30
-17
lines changed

10 files changed

+30
-17
lines changed

tools/sdk/lib/liblwip2.a

276 Bytes
Binary file not shown.

tools/sdk/lwip2/builder

Submodule builder updated 67 files

tools/sdk/lwip2/include/arch/cc.h

+2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ author: d. gauchard
3434

3535
#include "stdint.h"
3636

37+
#include "lwip-err-t.h"
38+
3739
#ifdef LWIP_BUILD
3840

3941
// define LWIP_BUILD only when building LWIP

tools/sdk/lwip2/include/lwip-err-t.h

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// script-generated, extracted from espressif SDK's lwIP arch/cc.h
2+
#define LWIP_NO_STDINT_H 1
3+
typedef unsigned char u8_t;
4+
typedef signed char s8_t;
5+
typedef unsigned short u16_t;
6+
typedef signed short s16_t;
7+
typedef unsigned long u32_t;
8+
typedef signed long s32_t;
9+
typedef unsigned long mem_ptr_t;
10+
#define LWIP_ERR_T s32_t
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// generated by makefiles/make-lwip2-hash
22
#ifndef LWIP_HASH_H
33
#define LWIP_HASH_H
4-
#define LWIP_HASH 0xc0862d6
5-
#define LWIP_HASH_STR "c0862d6(tag:STABLE-2_0_2_RELEASE_VER)"
4+
#define LWIP_HASH 0x92f23d6
5+
#define LWIP_HASH_STR "92f23d6(tag:STABLE-2_0_3_RELEASE)"
66
#endif // LWIP_HASH_H

tools/sdk/lwip2/include/lwip/def.h

+8-9
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,6 @@ u32_t lwip_htonl(u32_t x);
9191
#endif
9292
#define lwip_ntohl(x) lwip_htonl(x)
9393

94-
/* Provide usual function names as macros for users, but this can be turned off */
95-
#ifndef LWIP_DONT_PROVIDE_BYTEORDER_FUNCTIONS
96-
#define htons(x) lwip_htons(x)
97-
#define ntohs(x) lwip_ntohs(x)
98-
#define htonl(x) lwip_htonl(x)
99-
#define ntohl(x) lwip_ntohl(x)
100-
#endif
101-
10294
/* These macros should be calculated by the preprocessor and are used
10395
with compile-time constants only (so that there is no little-endian
10496
overhead at runtime). */
@@ -109,9 +101,16 @@ u32_t lwip_htonl(u32_t x);
109101
(((x) & 0x00ff0000UL) >> 8) | \
110102
(((x) & 0xff000000UL) >> 24))
111103
#define PP_NTOHL(x) PP_HTONL(x)
112-
113104
#endif /* BYTE_ORDER == BIG_ENDIAN */
114105

106+
/* Provide usual function names as macros for users, but this can be turned off */
107+
#ifndef LWIP_DONT_PROVIDE_BYTEORDER_FUNCTIONS
108+
#define htons(x) lwip_htons(x)
109+
#define ntohs(x) lwip_ntohs(x)
110+
#define htonl(x) lwip_htonl(x)
111+
#define ntohl(x) lwip_ntohl(x)
112+
#endif
113+
115114
/* Functions that are not available as standard implementations.
116115
* In cc.h, you can #define these to implementations available on
117116
* your platform to save some code bytes if you use these functions

tools/sdk/lwip2/include/lwip/dhcp.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ struct dhcp
108108

109109
void dhcp_set_struct(struct netif *netif, struct dhcp *dhcp);
110110
/** Remove a struct dhcp previously set to the netif using dhcp_set_struct() */
111-
#define dhcp_remove_struct(netif) do { (netif)->dhcp = NULL; } while(0)
111+
#define dhcp_remove_struct(netif) netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, NULL)
112112
void dhcp_cleanup(struct netif *netif);
113113
err_t dhcp_start(struct netif *netif);
114114
err_t dhcp_renew(struct netif *netif);

tools/sdk/lwip2/include/lwip/init.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ extern "C" {
5454
/** x.X.x: Minor version of the stack */
5555
#define LWIP_VERSION_MINOR 0
5656
/** x.x.X: Revision of the stack */
57-
#define LWIP_VERSION_REVISION 2
57+
#define LWIP_VERSION_REVISION 3
5858
/** For release candidates, this is set to 1..254
5959
* For official releases, this is set to 255 (LWIP_RC_RELEASE)
6060
* For development versions (Git), this is set to 0 (LWIP_RC_DEVELOPMENT) */

tools/sdk/lwip2/include/lwip/memp.h

+2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
#ifndef LWIP_HDR_MEMP_H
3939
#define LWIP_HDR_MEMP_H
4040

41+
#include "lwip/opt.h"
42+
4143
#ifdef __cplusplus
4244
extern "C" {
4345
#endif

tools/sdk/lwip2/include/lwip/stats.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -387,9 +387,9 @@ void stats_init(void);
387387

388388
#if MEM_STATS
389389
#define MEM_STATS_AVAIL(x, y) lwip_stats.mem.x = y
390-
#define MEM_STATS_INC(x) STATS_INC(mem.x)
391-
#define MEM_STATS_INC_USED(x, y) STATS_INC_USED(mem, y)
392-
#define MEM_STATS_DEC_USED(x, y) lwip_stats.mem.x -= y
390+
#define MEM_STATS_INC(x) SYS_ARCH_INC(lwip_stats.mem.x, 1)
391+
#define MEM_STATS_INC_USED(x, y) SYS_ARCH_INC(lwip_stats.mem.x, y)
392+
#define MEM_STATS_DEC_USED(x, y) SYS_ARCH_DEC(lwip_stats.mem.x, y)
393393
#define MEM_STATS_DISPLAY() stats_display_mem(&lwip_stats.mem, "HEAP")
394394
#else
395395
#define MEM_STATS_AVAIL(x, y)

0 commit comments

Comments
 (0)