From 3b74f44d10bef52d22a4e931374328339bdc88c6 Mon Sep 17 00:00:00 2001 From: Meco Man <920369182@qq.com> Date: Sun, 13 Jun 2021 13:01:15 +0800 Subject: [PATCH 1/3] =?UTF-8?q?[lwip][cc]=E8=B0=83=E6=95=B4string.h?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/net/lwip-1.4.1/src/arch/include/arch/cc.h | 6 ++---- components/net/lwip-2.0.2/src/arch/include/arch/cc.h | 4 +--- components/net/lwip-2.1.2/src/arch/include/arch/cc.h | 4 +--- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/components/net/lwip-1.4.1/src/arch/include/arch/cc.h b/components/net/lwip-1.4.1/src/arch/include/arch/cc.h index c312f50df5..a153658d27 100644 --- a/components/net/lwip-1.4.1/src/arch/include/arch/cc.h +++ b/components/net/lwip-1.4.1/src/arch/include/arch/cc.h @@ -37,8 +37,9 @@ #include #include - +#include #include + typedef uint8_t u8_t; typedef int8_t s8_t; typedef uint16_t u16_t; @@ -99,11 +100,8 @@ void sys_arch_assert(const char* file, int line); #define LWIP_PLATFORM_DIAG(x) do {rt_kprintf x;} while(0) #define LWIP_PLATFORM_ASSERT(x) do {rt_kprintf(x); sys_arch_assert(__FILE__, __LINE__);}while(0) -#include - #define SYS_ARCH_DECL_PROTECT(level) #define SYS_ARCH_PROTECT(level) rt_enter_critical() #define SYS_ARCH_UNPROTECT(level) rt_exit_critical() #endif /* __ARCH_CC_H__ */ - diff --git a/components/net/lwip-2.0.2/src/arch/include/arch/cc.h b/components/net/lwip-2.0.2/src/arch/include/arch/cc.h index 4829f5b2e5..95062441cf 100644 --- a/components/net/lwip-2.0.2/src/arch/include/arch/cc.h +++ b/components/net/lwip-2.0.2/src/arch/include/arch/cc.h @@ -37,6 +37,7 @@ #include #include +#include #define U16_F "hu" #define S16_F "hd" @@ -90,11 +91,8 @@ void sys_arch_assert(const char* file, int line); #define LWIP_PLATFORM_DIAG(x) do {rt_kprintf x;} while(0) #define LWIP_PLATFORM_ASSERT(x) do {rt_kprintf(x); sys_arch_assert(__FILE__, __LINE__);}while(0) -#include - #define SYS_ARCH_DECL_PROTECT(level) #define SYS_ARCH_PROTECT(level) rt_enter_critical() #define SYS_ARCH_UNPROTECT(level) rt_exit_critical() #endif /* __ARCH_CC_H__ */ - diff --git a/components/net/lwip-2.1.2/src/arch/include/arch/cc.h b/components/net/lwip-2.1.2/src/arch/include/arch/cc.h index 8e98013412..95062441cf 100644 --- a/components/net/lwip-2.1.2/src/arch/include/arch/cc.h +++ b/components/net/lwip-2.1.2/src/arch/include/arch/cc.h @@ -37,6 +37,7 @@ #include #include +#include #define U16_F "hu" #define S16_F "hd" @@ -90,11 +91,8 @@ void sys_arch_assert(const char* file, int line); #define LWIP_PLATFORM_DIAG(x) do {rt_kprintf x;} while(0) #define LWIP_PLATFORM_ASSERT(x) do {rt_kprintf(x); sys_arch_assert(__FILE__, __LINE__);}while(0) -#include "string.h" - #define SYS_ARCH_DECL_PROTECT(level) #define SYS_ARCH_PROTECT(level) rt_enter_critical() #define SYS_ARCH_UNPROTECT(level) rt_exit_critical() #endif /* __ARCH_CC_H__ */ - From ce06e5e160f8c307da742d77c1d80361d7c9aeb1 Mon Sep 17 00:00:00 2001 From: Meco Man <920369182@qq.com> Date: Sun, 13 Jun 2021 13:15:59 +0800 Subject: [PATCH 2/3] adjust drv_eth.c's head files --- bsp/stm32/libraries/HAL_Drivers/drv_eth.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_eth.c b/bsp/stm32/libraries/HAL_Drivers/drv_eth.c index 0506f6495c..41e86b5134 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drv_eth.c +++ b/bsp/stm32/libraries/HAL_Drivers/drv_eth.c @@ -11,11 +11,10 @@ * 2019-09-03 xiaofan optimize link change detection process */ -#include "board.h" #include "drv_config.h" -#include -#include "lwipopts.h" #include "drv_eth.h" +#include +#include /* * Emac driver uses CubeMX tool to generate emac and phy's configuration, From 485df7a1f444a440d297a19e2c12e1b5ad9612ce Mon Sep 17 00:00:00 2001 From: Meco Man <920369182@qq.com> Date: Sun, 13 Jun 2021 15:43:44 +0800 Subject: [PATCH 3/3] =?UTF-8?q?[bug][lwip]=20=E4=BF=AE=E5=A4=8Dlwip?= =?UTF-8?q?=E4=B8=B4=E7=95=8C=E5=8C=BA=E4=BF=9D=E6=8A=A4=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/net/lwip-1.4.1/src/arch/include/arch/cc.h | 6 +++--- components/net/lwip-2.0.2/src/arch/include/arch/cc.h | 6 +++--- components/net/lwip-2.1.2/src/arch/include/arch/cc.h | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/components/net/lwip-1.4.1/src/arch/include/arch/cc.h b/components/net/lwip-1.4.1/src/arch/include/arch/cc.h index a153658d27..82387b432d 100644 --- a/components/net/lwip-1.4.1/src/arch/include/arch/cc.h +++ b/components/net/lwip-1.4.1/src/arch/include/arch/cc.h @@ -100,8 +100,8 @@ void sys_arch_assert(const char* file, int line); #define LWIP_PLATFORM_DIAG(x) do {rt_kprintf x;} while(0) #define LWIP_PLATFORM_ASSERT(x) do {rt_kprintf(x); sys_arch_assert(__FILE__, __LINE__);}while(0) -#define SYS_ARCH_DECL_PROTECT(level) -#define SYS_ARCH_PROTECT(level) rt_enter_critical() -#define SYS_ARCH_UNPROTECT(level) rt_exit_critical() +#define SYS_ARCH_DECL_PROTECT(level) register rt_base_t level +#define SYS_ARCH_PROTECT(level) do {level = rt_hw_interrupt_disable();} while(0) +#define SYS_ARCH_UNPROTECT(level) do {rt_hw_interrupt_enable(level);} while(0) #endif /* __ARCH_CC_H__ */ diff --git a/components/net/lwip-2.0.2/src/arch/include/arch/cc.h b/components/net/lwip-2.0.2/src/arch/include/arch/cc.h index 95062441cf..28f86d257e 100644 --- a/components/net/lwip-2.0.2/src/arch/include/arch/cc.h +++ b/components/net/lwip-2.0.2/src/arch/include/arch/cc.h @@ -91,8 +91,8 @@ void sys_arch_assert(const char* file, int line); #define LWIP_PLATFORM_DIAG(x) do {rt_kprintf x;} while(0) #define LWIP_PLATFORM_ASSERT(x) do {rt_kprintf(x); sys_arch_assert(__FILE__, __LINE__);}while(0) -#define SYS_ARCH_DECL_PROTECT(level) -#define SYS_ARCH_PROTECT(level) rt_enter_critical() -#define SYS_ARCH_UNPROTECT(level) rt_exit_critical() +#define SYS_ARCH_DECL_PROTECT(level) register rt_base_t level +#define SYS_ARCH_PROTECT(level) do {level = rt_hw_interrupt_disable();} while(0) +#define SYS_ARCH_UNPROTECT(level) do {rt_hw_interrupt_enable(level);} while(0) #endif /* __ARCH_CC_H__ */ diff --git a/components/net/lwip-2.1.2/src/arch/include/arch/cc.h b/components/net/lwip-2.1.2/src/arch/include/arch/cc.h index 95062441cf..28f86d257e 100644 --- a/components/net/lwip-2.1.2/src/arch/include/arch/cc.h +++ b/components/net/lwip-2.1.2/src/arch/include/arch/cc.h @@ -91,8 +91,8 @@ void sys_arch_assert(const char* file, int line); #define LWIP_PLATFORM_DIAG(x) do {rt_kprintf x;} while(0) #define LWIP_PLATFORM_ASSERT(x) do {rt_kprintf(x); sys_arch_assert(__FILE__, __LINE__);}while(0) -#define SYS_ARCH_DECL_PROTECT(level) -#define SYS_ARCH_PROTECT(level) rt_enter_critical() -#define SYS_ARCH_UNPROTECT(level) rt_exit_critical() +#define SYS_ARCH_DECL_PROTECT(level) register rt_base_t level +#define SYS_ARCH_PROTECT(level) do {level = rt_hw_interrupt_disable();} while(0) +#define SYS_ARCH_UNPROTECT(level) do {rt_hw_interrupt_enable(level);} while(0) #endif /* __ARCH_CC_H__ */