summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMeco Man <[email protected]>2021-08-03 10:27:48 +0800
committerMeco Man <[email protected]>2021-08-03 10:27:48 +0800
commit4cac267927bfabef0987e32dc2d1bf722757f6c6 (patch)
tree19bc2dd35d20849eb8e2c889e330e3b83e1c6db8
parent3cb13b452394d1aca4874ccb935bed2c0f7d462f (diff)
[lwip] implement RT_USING_ASM_MEMCPY
-rw-r--r--components/net/lwip-1.4.1/src/lwipopts.h7
-rw-r--r--components/net/lwip-2.0.2/src/lwipopts.h11
-rw-r--r--components/net/lwip-2.0.3/src/lwipopts.h11
-rw-r--r--components/net/lwip-2.1.2/src/lwipopts.h11
4 files changed, 34 insertions, 6 deletions
diff --git a/components/net/lwip-1.4.1/src/lwipopts.h b/components/net/lwip-1.4.1/src/lwipopts.h
index 0b7e092d6c..9148066d50 100644
--- a/components/net/lwip-1.4.1/src/lwipopts.h
+++ b/components/net/lwip-1.4.1/src/lwipopts.h
@@ -222,6 +222,13 @@
#define LWIP_DBG_TYPES_ON (LWIP_DBG_ON|LWIP_DBG_TRACE|LWIP_DBG_STATE|LWIP_DBG_FRESH|LWIP_DBG_HALT)
/* ---------- Memory options ---------- */
+#ifdef RT_USING_ASM_MEMCPY
+#define MEMCPY(dst,src,len) rt_memcpy(dst,src,len)
+#else
+#define MEMCPY(dst,src,len) memcpy(dst,src,len)
+#endif /* RT_USING_ASM_MEMCPY */
+#define SMEMCPY(dst,src,len) MEMCPY(dst,src,len)
+
#define MEM_ALIGNMENT 4
#define MEM_LIBC_MALLOC 1
diff --git a/components/net/lwip-2.0.2/src/lwipopts.h b/components/net/lwip-2.0.2/src/lwipopts.h
index d559684c02..fdfe1437b2 100644
--- a/components/net/lwip-2.0.2/src/lwipopts.h
+++ b/components/net/lwip-2.0.2/src/lwipopts.h
@@ -230,14 +230,21 @@
#define LWIP_DBG_TYPES_ON (LWIP_DBG_ON|LWIP_DBG_TRACE|LWIP_DBG_STATE|LWIP_DBG_FRESH|LWIP_DBG_HALT)
/* ---------- Memory options ---------- */
+#ifdef RT_USING_ASM_MEMCPY
+#define MEMCPY(dst,src,len) rt_memcpy(dst,src,len)
+#else
+#define MEMCPY(dst,src,len) memcpy(dst,src,len)
+#endif /* RT_USING_ASM_MEMCPY */
+#define SMEMCPY(dst,src,len) MEMCPY(dst,src,len)
+
#ifdef RT_LWIP_MEM_ALIGNMENT
#define MEM_ALIGNMENT RT_LWIP_MEM_ALIGNMENT
#else
#define MEM_ALIGNMENT 4
#endif
-#define MEMP_OVERFLOW_CHECK 1 ////
-#define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 1 ////
+#define MEMP_OVERFLOW_CHECK 1
+#define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 1
//#define MEM_LIBC_MALLOC 1
//#define MEM_USE_POOLS 1
//#define MEMP_USE_CUSTOM_POOLS 1
diff --git a/components/net/lwip-2.0.3/src/lwipopts.h b/components/net/lwip-2.0.3/src/lwipopts.h
index d559684c02..fdfe1437b2 100644
--- a/components/net/lwip-2.0.3/src/lwipopts.h
+++ b/components/net/lwip-2.0.3/src/lwipopts.h
@@ -230,14 +230,21 @@
#define LWIP_DBG_TYPES_ON (LWIP_DBG_ON|LWIP_DBG_TRACE|LWIP_DBG_STATE|LWIP_DBG_FRESH|LWIP_DBG_HALT)
/* ---------- Memory options ---------- */
+#ifdef RT_USING_ASM_MEMCPY
+#define MEMCPY(dst,src,len) rt_memcpy(dst,src,len)
+#else
+#define MEMCPY(dst,src,len) memcpy(dst,src,len)
+#endif /* RT_USING_ASM_MEMCPY */
+#define SMEMCPY(dst,src,len) MEMCPY(dst,src,len)
+
#ifdef RT_LWIP_MEM_ALIGNMENT
#define MEM_ALIGNMENT RT_LWIP_MEM_ALIGNMENT
#else
#define MEM_ALIGNMENT 4
#endif
-#define MEMP_OVERFLOW_CHECK 1 ////
-#define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 1 ////
+#define MEMP_OVERFLOW_CHECK 1
+#define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 1
//#define MEM_LIBC_MALLOC 1
//#define MEM_USE_POOLS 1
//#define MEMP_USE_CUSTOM_POOLS 1
diff --git a/components/net/lwip-2.1.2/src/lwipopts.h b/components/net/lwip-2.1.2/src/lwipopts.h
index 2cd7cb023a..a964ab13ac 100644
--- a/components/net/lwip-2.1.2/src/lwipopts.h
+++ b/components/net/lwip-2.1.2/src/lwipopts.h
@@ -242,9 +242,16 @@
#endif
/* ---------- Memory options ---------- */
+#ifdef RT_USING_ASM_MEMCPY
+#define MEMCPY(dst,src,len) rt_memcpy(dst,src,len)
+#else
+#define MEMCPY(dst,src,len) memcpy(dst,src,len)
+#endif /* RT_USING_ASM_MEMCPY */
+#define SMEMCPY(dst,src,len) MEMCPY(dst,src,len)
+
#define MEM_ALIGNMENT 4
-#define MEMP_OVERFLOW_CHECK 1 ////
-#define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 1 ////
+#define MEMP_OVERFLOW_CHECK 1
+#define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 1
//#define MEM_LIBC_MALLOC 1
//#define MEM_USE_POOLS 1
//#define MEMP_USE_CUSTOM_POOLS 1