summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2017-10-27 10:17:28 +0800
committerGitHub <[email protected]>2017-10-27 10:17:28 +0800
commit192a6db76332944da8937307af3160bf3c826ade (patch)
tree3c935196ba6e5dd968209c2de3025106ab34b71a
parentebf0b32f52cf2b5a3ba011588ae9f2741e3a5bdd (diff)
parent064f182a0d75623ac8d208c932fc74b5168a3893 (diff)
Merge pull request #906 from ArdaFu/master
[BSP] Repalce RT_LWIP_IPADDR RT_LWIP_GWADDR RT_LWIP_MSKADDR define
-rw-r--r--bsp/CME_M7/rtconfig.h21
-rwxr-xr-xbsp/at91sam9260/rtconfig.h15
-rw-r--r--bsp/frdm-k64f/rtconfig.h21
-rw-r--r--bsp/lm3s8962/rtconfig.h21
-rw-r--r--bsp/lm3s9b9x/rtconfig.h21
-rw-r--r--bsp/lpc176x/rtconfig.h15
-rw-r--r--bsp/mini2440/rtconfig.h15
-rw-r--r--bsp/sam7x/rtconfig.h21
-rw-r--r--bsp/stm32f107/rtconfig.h21
-rw-r--r--bsp/tm4c129x/rtconfig.h15
-rw-r--r--components/net/lwip-1.4.1/src/arch/sys_arch.c1
-rw-r--r--components/net/lwip-1.4.1/src/netif/ethernetif.c1
12 files changed, 50 insertions, 138 deletions
diff --git a/bsp/CME_M7/rtconfig.h b/bsp/CME_M7/rtconfig.h
index 97fa513660..d0e44c8d28 100644
--- a/bsp/CME_M7/rtconfig.h
+++ b/bsp/CME_M7/rtconfig.h
@@ -103,23 +103,14 @@
/* the number of simulatenously active TCP connections*/
#define RT_LWIP_TCP_PCB_NUM 3
-/* ip address of target*/
-#define RT_LWIP_IPADDR0 192
-#define RT_LWIP_IPADDR1 168
-#define RT_LWIP_IPADDR2 1
-#define RT_LWIP_IPADDR3 30
+/* ip address of target */
+#define RT_LWIP_IPADDR "192.168.1.30"
-/* gateway address of target*/
-#define RT_LWIP_GWADDR0 192
-#define RT_LWIP_GWADDR1 168
-#define RT_LWIP_GWADDR2 1
-#define RT_LWIP_GWADDR3 1
+/* gateway address of target */
+#define RT_LWIP_GWADDR "192.168.1.1"
-/* mask address of target*/
-#define RT_LWIP_MSKADDR0 255
-#define RT_LWIP_MSKADDR1 255
-#define RT_LWIP_MSKADDR2 255
-#define RT_LWIP_MSKADDR3 0
+/* mask address of target */
+#define RT_LWIP_MSKADDR "255.255.255.0"
/* tcp thread options */
#define RT_LWIP_TCPTHREAD_PRIORITY 12
diff --git a/bsp/at91sam9260/rtconfig.h b/bsp/at91sam9260/rtconfig.h
index 07f39ca13a..53ca53359d 100755
--- a/bsp/at91sam9260/rtconfig.h
+++ b/bsp/at91sam9260/rtconfig.h
@@ -177,22 +177,13 @@
/* #define RT_LWIP_DHCP */
/* ip address of target */
-#define RT_LWIP_IPADDR0 192
-#define RT_LWIP_IPADDR1 168
-#define RT_LWIP_IPADDR2 1
-#define RT_LWIP_IPADDR3 30
+#define RT_LWIP_IPADDR "192.168.1.30"
/* gateway address of target */
-#define RT_LWIP_GWADDR0 192
-#define RT_LWIP_GWADDR1 168
-#define RT_LWIP_GWADDR2 1
-#define RT_LWIP_GWADDR3 1
+#define RT_LWIP_GWADDR "192.168.1.1"
/* mask address of target */
-#define RT_LWIP_MSKADDR0 255
-#define RT_LWIP_MSKADDR1 255
-#define RT_LWIP_MSKADDR2 255
-#define RT_LWIP_MSKADDR3 0
+#define RT_LWIP_MSKADDR "255.255.255.0"
/* the number of blocks for pbuf */
#define RT_LWIP_PBUF_NUM 16
diff --git a/bsp/frdm-k64f/rtconfig.h b/bsp/frdm-k64f/rtconfig.h
index 1cb5eca259..d8e6f6dbc5 100644
--- a/bsp/frdm-k64f/rtconfig.h
+++ b/bsp/frdm-k64f/rtconfig.h
@@ -115,23 +115,14 @@
/* the number of simulatenously active TCP connections*/
#define RT_LWIP_TCP_PCB_NUM 5
-/* ip address of target*/
-#define RT_LWIP_IPADDR0 192
-#define RT_LWIP_IPADDR1 168
-#define RT_LWIP_IPADDR2 1
-#define RT_LWIP_IPADDR3 201
+/* ip address of target */
+#define RT_LWIP_IPADDR "192.168.1.201"
-/* gateway address of target*/
-#define RT_LWIP_GWADDR0 192
-#define RT_LWIP_GWADDR1 168
-#define RT_LWIP_GWADDR2 1
-#define RT_LWIP_GWADDR3 1
+/* gateway address of target */
+#define RT_LWIP_GWADDR "192.168.1.1"
-/* mask address of target*/
-#define RT_LWIP_MSKADDR0 255
-#define RT_LWIP_MSKADDR1 255
-#define RT_LWIP_MSKADDR2 255
-#define RT_LWIP_MSKADDR3 0
+/* mask address of target */
+#define RT_LWIP_MSKADDR "255.255.255.0"
/* tcp thread options */
#define RT_LWIP_TCPTHREAD_PRIORITY 12
diff --git a/bsp/lm3s8962/rtconfig.h b/bsp/lm3s8962/rtconfig.h
index 22a24106ab..b154688a6d 100644
--- a/bsp/lm3s8962/rtconfig.h
+++ b/bsp/lm3s8962/rtconfig.h
@@ -122,23 +122,14 @@
#define RT_LWIP_DNS
-/* ip address of target*/
-#define RT_LWIP_IPADDR0 192
-#define RT_LWIP_IPADDR1 168
-#define RT_LWIP_IPADDR2 1
-#define RT_LWIP_IPADDR3 30
+/* ip address of target */
+#define RT_LWIP_IPADDR "192.168.1.30"
-/* gateway address of target*/
-#define RT_LWIP_GWADDR0 192
-#define RT_LWIP_GWADDR1 168
-#define RT_LWIP_GWADDR2 1
-#define RT_LWIP_GWADDR3 1
+/* gateway address of target */
+#define RT_LWIP_GWADDR "192.168.1.1"
-/* mask address of target*/
-#define RT_LWIP_MSKADDR0 255
-#define RT_LWIP_MSKADDR1 255
-#define RT_LWIP_MSKADDR2 255
-#define RT_LWIP_MSKADDR3 0
+/* mask address of target */
+#define RT_LWIP_MSKADDR "255.255.255.0"
/* tcp thread options */
#define RT_LWIP_TCPTHREAD_PRIORITY 22
diff --git a/bsp/lm3s9b9x/rtconfig.h b/bsp/lm3s9b9x/rtconfig.h
index b6afc30723..b961c26d6f 100644
--- a/bsp/lm3s9b9x/rtconfig.h
+++ b/bsp/lm3s9b9x/rtconfig.h
@@ -119,23 +119,14 @@
#define RT_LWIP_DNS
-/* ip address of target*/
-#define RT_LWIP_IPADDR0 192
-#define RT_LWIP_IPADDR1 168
-#define RT_LWIP_IPADDR2 1
-#define RT_LWIP_IPADDR3 30
+/* ip address of target */
+#define RT_LWIP_IPADDR "192.168.1.30"
-/* gateway address of target*/
-#define RT_LWIP_GWADDR0 192
-#define RT_LWIP_GWADDR1 168
-#define RT_LWIP_GWADDR2 1
-#define RT_LWIP_GWADDR3 1
+/* gateway address of target */
+#define RT_LWIP_GWADDR "192.168.1.1"
-/* mask address of target*/
-#define RT_LWIP_MSKADDR0 255
-#define RT_LWIP_MSKADDR1 255
-#define RT_LWIP_MSKADDR2 255
-#define RT_LWIP_MSKADDR3 0
+/* mask address of target */
+#define RT_LWIP_MSKADDR "255.255.255.0"
/* tcp thread options */
#define RT_LWIP_TCPTHREAD_PRIORITY 12
diff --git a/bsp/lpc176x/rtconfig.h b/bsp/lpc176x/rtconfig.h
index eb7e3e6401..726b887047 100644
--- a/bsp/lpc176x/rtconfig.h
+++ b/bsp/lpc176x/rtconfig.h
@@ -191,20 +191,11 @@
// <integer name="RT_LWIP_ETHTHREAD_STACKSIZE" description="the stack size of ethnetif thread" default="512" />
#define RT_LWIP_ETHTHREAD_STACKSIZE 512
// <ipaddr name="RT_LWIP_IPADDR" description="IP address of device" default="192.168.1.30" />
-#define RT_LWIP_IPADDR0 192
-#define RT_LWIP_IPADDR1 168
-#define RT_LWIP_IPADDR2 1
-#define RT_LWIP_IPADDR3 30
+#define RT_LWIP_IPADDR "192.168.1.30"
// <ipaddr name="RT_LWIP_GWADDR" description="Gateway address of device" default="192.168.1.1" />
-#define RT_LWIP_GWADDR0 192
-#define RT_LWIP_GWADDR1 168
-#define RT_LWIP_GWADDR2 1
-#define RT_LWIP_GWADDR3 1
+#define RT_LWIP_GWADDR "192.168.1.1"
// <ipaddr name="RT_LWIP_MSKADDR" description="Mask address of device" default="255.255.255.0" />
-#define RT_LWIP_MSKADDR0 255
-#define RT_LWIP_MSKADDR1 255
-#define RT_LWIP_MSKADDR2 255
-#define RT_LWIP_MSKADDR3 0
+#define RT_LWIP_MSKADDR "255.255.255.0"
// </section>
// <bool name="RT_USING_CMSIS_OS" description="Using CMSIS OS API" default="true" />
diff --git a/bsp/mini2440/rtconfig.h b/bsp/mini2440/rtconfig.h
index 32ee42c908..475ba91062 100644
--- a/bsp/mini2440/rtconfig.h
+++ b/bsp/mini2440/rtconfig.h
@@ -164,20 +164,11 @@
// <integer name="RT_LWIP_ETHTHREAD_STACKSIZE" description="the stack size of ethnetif thread" default="512" />
#define RT_LWIP_ETHTHREAD_STACKSIZE 512
// <ipaddr name="RT_LWIP_IPADDR" description="IP address of device" default="192.168.1.30" />
-#define RT_LWIP_IPADDR0 192
-#define RT_LWIP_IPADDR1 168
-#define RT_LWIP_IPADDR2 1
-#define RT_LWIP_IPADDR3 30
+#define RT_LWIP_IPADDR "192.168.1.30"
// <ipaddr name="RT_LWIP_GWADDR" description="Gateway address of device" default="192.168.1.1" />
-#define RT_LWIP_GWADDR0 192
-#define RT_LWIP_GWADDR1 168
-#define RT_LWIP_GWADDR2 1
-#define RT_LWIP_GWADDR3 1
+#define RT_LWIP_GWADDR "192.168.1.1"
// <ipaddr name="RT_LWIP_MSKADDR" description="Mask address of device" default="255.255.255.0" />
-#define RT_LWIP_MSKADDR0 255
-#define RT_LWIP_MSKADDR1 255
-#define RT_LWIP_MSKADDR2 255
-#define RT_LWIP_MSKADDR3 0
+#define RT_LWIP_MSKADDR "255.255.255.0"
// </section>
// <section name="RT_USING_MODULE" description="Application module" default="true" >
diff --git a/bsp/sam7x/rtconfig.h b/bsp/sam7x/rtconfig.h
index a1c31bc3ce..bb3e3546d0 100644
--- a/bsp/sam7x/rtconfig.h
+++ b/bsp/sam7x/rtconfig.h
@@ -118,23 +118,14 @@
/* Using DHCP*/
/* #define RT_LWIP_DHCP */
-/* ip address of target*/
-#define RT_LWIP_IPADDR0 192
-#define RT_LWIP_IPADDR1 168
-#define RT_LWIP_IPADDR2 1
-#define RT_LWIP_IPADDR3 30
+/* ip address of target */
+#define RT_LWIP_IPADDR "192.168.1.30"
-/* gateway address of target*/
-#define RT_LWIP_GWADDR0 192
-#define RT_LWIP_GWADDR1 168
-#define RT_LWIP_GWADDR2 1
-#define RT_LWIP_GWADDR3 1
+/* gateway address of target */
+#define RT_LWIP_GWADDR "192.168.1.1"
-/* mask address of target*/
-#define RT_LWIP_MSKADDR0 255
-#define RT_LWIP_MSKADDR1 255
-#define RT_LWIP_MSKADDR2 255
-#define RT_LWIP_MSKADDR3 0
+/* mask address of target */
+#define RT_LWIP_MSKADDR "255.255.255.0"
/* SECTION: DFS options */
//#define RT_USING_DFS
diff --git a/bsp/stm32f107/rtconfig.h b/bsp/stm32f107/rtconfig.h
index c4cd0c8368..210b165a4d 100644
--- a/bsp/stm32f107/rtconfig.h
+++ b/bsp/stm32f107/rtconfig.h
@@ -115,23 +115,14 @@
/* the number of simulatenously active TCP connections*/
#define RT_LWIP_TCP_PCB_NUM 5
-/* ip address of target*/
-#define RT_LWIP_IPADDR0 192
-#define RT_LWIP_IPADDR1 168
-#define RT_LWIP_IPADDR2 1
-#define RT_LWIP_IPADDR3 30
+/* ip address of target */
+#define RT_LWIP_IPADDR "192.168.1.30"
-/* gateway address of target*/
-#define RT_LWIP_GWADDR0 192
-#define RT_LWIP_GWADDR1 168
-#define RT_LWIP_GWADDR2 1
-#define RT_LWIP_GWADDR3 1
+/* gateway address of target */
+#define RT_LWIP_GWADDR "192.168.1.1"
-/* mask address of target*/
-#define RT_LWIP_MSKADDR0 255
-#define RT_LWIP_MSKADDR1 255
-#define RT_LWIP_MSKADDR2 255
-#define RT_LWIP_MSKADDR3 0
+/* mask address of target */
+#define RT_LWIP_MSKADDR "255.255.255.0"
/* tcp thread options */
#define RT_LWIP_TCPTHREAD_PRIORITY 12
diff --git a/bsp/tm4c129x/rtconfig.h b/bsp/tm4c129x/rtconfig.h
index 6da197d331..c0c7ffced1 100644
--- a/bsp/tm4c129x/rtconfig.h
+++ b/bsp/tm4c129x/rtconfig.h
@@ -206,20 +206,11 @@
// <integer name="RT_LWIP_ETHTHREAD_STACKSIZE" description="the stack size of ethnetif thread" default="512" />
#define RT_LWIP_ETHTHREAD_STACKSIZE 512
// <ipaddr name="RT_LWIP_IPADDR" description="IP address of device" default="192.168.1.30" />
-#define RT_LWIP_IPADDR0 192
-#define RT_LWIP_IPADDR1 168
-#define RT_LWIP_IPADDR2 1
-#define RT_LWIP_IPADDR3 30
+#define RT_LWIP_IPADDR "192.168.1.30"
// <ipaddr name="RT_LWIP_GWADDR" description="Gateway address of device" default="192.168.1.1" />
-#define RT_LWIP_GWADDR0 192
-#define RT_LWIP_GWADDR1 168
-#define RT_LWIP_GWADDR2 1
-#define RT_LWIP_GWADDR3 1
+#define RT_LWIP_GWADDR "192.168.1.1"
// <ipaddr name="RT_LWIP_MSKADDR" description="Mask address of device" default="255.255.255.0" />
-#define RT_LWIP_MSKADDR0 255
-#define RT_LWIP_MSKADDR1 255
-#define RT_LWIP_MSKADDR2 255
-#define RT_LWIP_MSKADDR3 0
+#define RT_LWIP_MSKADDR "255.255.255.0"
// </section>
diff --git a/components/net/lwip-1.4.1/src/arch/sys_arch.c b/components/net/lwip-1.4.1/src/arch/sys_arch.c
index 0963f8d403..14e61fb88f 100644
--- a/components/net/lwip-1.4.1/src/arch/sys_arch.c
+++ b/components/net/lwip-1.4.1/src/arch/sys_arch.c
@@ -26,6 +26,7 @@
#include "netif/ethernetif.h"
#include "lwip/sio.h"
#include <lwip/init.h>
+#include "lwip/inet.h"
#include <string.h>
diff --git a/components/net/lwip-1.4.1/src/netif/ethernetif.c b/components/net/lwip-1.4.1/src/netif/ethernetif.c
index 96e1672fe9..9fbb883f36 100644
--- a/components/net/lwip-1.4.1/src/netif/ethernetif.c
+++ b/components/net/lwip-1.4.1/src/netif/ethernetif.c
@@ -63,6 +63,7 @@
#include "netif/etharp.h"
#include "netif/ethernetif.h"
+#include "lwip/inet.h"
#define netifapi_netif_set_link_up(n) netifapi_netif_common(n, netif_set_link_up, NULL)
#define netifapi_netif_set_link_down(n) netifapi_netif_common(n, netif_set_link_down, NULL)