From bd24c67d06f2eee667e6698aba7b3a9523c94b23 Mon Sep 17 00:00:00 2001 From: Meco Man <920369182@qq.com> Date: Sun, 17 Oct 2021 17:30:30 -0400 Subject: [PATCH] define RT_USING_BIG_ENDIAN for the long-term version --- components/net/lwip-1.4.1/src/arch/include/arch/sys_arch.h | 4 +++- components/net/lwip-2.0.2/src/arch/include/arch/sys_arch.h | 4 +++- components/net/lwip-2.0.3/src/arch/include/arch/sys_arch.h | 4 +++- components/net/lwip-2.1.2/src/arch/include/arch/sys_arch.h | 4 +++- src/Kconfig | 4 ++++ 5 files changed, 16 insertions(+), 4 deletions(-) diff --git a/components/net/lwip-1.4.1/src/arch/include/arch/sys_arch.h b/components/net/lwip-1.4.1/src/arch/include/arch/sys_arch.h index 72814aa25c..b4c81772aa 100644 --- a/components/net/lwip-1.4.1/src/arch/include/arch/sys_arch.h +++ b/components/net/lwip-1.4.1/src/arch/include/arch/sys_arch.h @@ -39,7 +39,9 @@ #include -#ifndef BYTE_ORDER +#ifdef RT_USING_BIG_ENDIAN +#define BYTE_ORDER BIG_ENDIAN +#else #define BYTE_ORDER LITTLE_ENDIAN #endif diff --git a/components/net/lwip-2.0.2/src/arch/include/arch/sys_arch.h b/components/net/lwip-2.0.2/src/arch/include/arch/sys_arch.h index 8637cc9263..550a96cb3c 100644 --- a/components/net/lwip-2.0.2/src/arch/include/arch/sys_arch.h +++ b/components/net/lwip-2.0.2/src/arch/include/arch/sys_arch.h @@ -39,7 +39,9 @@ #include -#ifndef BYTE_ORDER +#ifdef RT_USING_BIG_ENDIAN +#define BYTE_ORDER BIG_ENDIAN +#else #define BYTE_ORDER LITTLE_ENDIAN #endif diff --git a/components/net/lwip-2.0.3/src/arch/include/arch/sys_arch.h b/components/net/lwip-2.0.3/src/arch/include/arch/sys_arch.h index 8637cc9263..550a96cb3c 100644 --- a/components/net/lwip-2.0.3/src/arch/include/arch/sys_arch.h +++ b/components/net/lwip-2.0.3/src/arch/include/arch/sys_arch.h @@ -39,7 +39,9 @@ #include -#ifndef BYTE_ORDER +#ifdef RT_USING_BIG_ENDIAN +#define BYTE_ORDER BIG_ENDIAN +#else #define BYTE_ORDER LITTLE_ENDIAN #endif diff --git a/components/net/lwip-2.1.2/src/arch/include/arch/sys_arch.h b/components/net/lwip-2.1.2/src/arch/include/arch/sys_arch.h index 1e97f8a5ac..a47831d085 100644 --- a/components/net/lwip-2.1.2/src/arch/include/arch/sys_arch.h +++ b/components/net/lwip-2.1.2/src/arch/include/arch/sys_arch.h @@ -39,7 +39,9 @@ #include -#ifndef BYTE_ORDER +#ifdef RT_USING_BIG_ENDIAN +#define BYTE_ORDER BIG_ENDIAN +#else #define BYTE_ORDER LITTLE_ENDIAN #endif diff --git a/src/Kconfig b/src/Kconfig index fc7fcd54f4..e31afc25fa 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -8,6 +8,10 @@ config RT_NAME_MAX Each kernel object, such as thread, timer, semaphore etc, has a name, the RT_NAME_MAX is the maximal size of this object name. +config RT_USING_BIG_ENDIAN + bool + default n + config RT_USING_ARCH_DATA_TYPE bool "Use the data types defined in ARCH_CPU" default n