[modify] #5333, PR; [lwip] solve the conflict between multi BYTE_ORDER(s)

This commit is contained in:
liuxianliang 2021-12-22 14:37:33 +08:00
parent 7759628db7
commit 1ab47d2f31
11 changed files with 35 additions and 34 deletions

View File

@ -40,6 +40,14 @@
#include <string.h> #include <string.h>
#include <stdint.h> #include <stdint.h>
#ifndef BYTE_ORDER
#ifdef RT_USING_BIG_ENDIAN
#define BYTE_ORDER BIG_ENDIAN
#else
#define BYTE_ORDER LITTLE_ENDIAN
#endif /* RT_USING_BIG_ENDIAN */
#endif /* BYTE_ORDER */
typedef uint8_t u8_t; typedef uint8_t u8_t;
typedef int8_t s8_t; typedef int8_t s8_t;
typedef uint16_t u16_t; typedef uint16_t u16_t;

View File

@ -39,14 +39,10 @@
#include <rtthread.h> #include <rtthread.h>
#ifndef BYTE_ORDER
#define BYTE_ORDER LITTLE_ENDIAN
#endif
#define SYS_MBOX_NULL RT_NULL #define SYS_MBOX_NULL RT_NULL
#define SYS_SEM_NULL RT_NULL #define SYS_SEM_NULL RT_NULL
typedef u32_t sys_prot_t; typedef rt_uint32_t sys_prot_t;
#define SYS_MBOX_SIZE 10 #define SYS_MBOX_SIZE 10
#define SYS_LWIP_TIMER_NAME "timer" #define SYS_LWIP_TIMER_NAME "timer"

View File

@ -37,10 +37,6 @@
#define LWIP_PLATFORM_BYTESWAP 0 #define LWIP_PLATFORM_BYTESWAP 0
#ifndef BYTE_ORDER
#define BYTE_ORDER LITTLE_ENDIAN
#endif
/* #define RT_LWIP_DEBUG */ /* #define RT_LWIP_DEBUG */
#ifdef RT_LWIP_DEBUG #ifdef RT_LWIP_DEBUG

View File

@ -39,6 +39,14 @@
#include <rtthread.h> #include <rtthread.h>
#include <string.h> #include <string.h>
#ifndef BYTE_ORDER
#ifdef RT_USING_BIG_ENDIAN
#define BYTE_ORDER BIG_ENDIAN
#else
#define BYTE_ORDER LITTLE_ENDIAN
#endif /* RT_USING_BIG_ENDIAN */
#endif /* BYTE_ORDER */
#define U16_F "hu" #define U16_F "hu"
#define S16_F "hd" #define S16_F "hd"
#define X16_F "hx" #define X16_F "hx"

View File

@ -39,14 +39,10 @@
#include <rtthread.h> #include <rtthread.h>
#ifndef BYTE_ORDER
#define BYTE_ORDER LITTLE_ENDIAN
#endif
#define SYS_MBOX_NULL RT_NULL #define SYS_MBOX_NULL RT_NULL
#define SYS_SEM_NULL RT_NULL #define SYS_SEM_NULL RT_NULL
typedef u32_t sys_prot_t; typedef rt_uint32_t sys_prot_t;
#define SYS_MBOX_SIZE 10 #define SYS_MBOX_SIZE 10
#define SYS_LWIP_TIMER_NAME "timer" #define SYS_LWIP_TIMER_NAME "timer"

View File

@ -45,10 +45,6 @@
#define LWIP_PLATFORM_BYTESWAP 0 #define LWIP_PLATFORM_BYTESWAP 0
#ifndef BYTE_ORDER
#define BYTE_ORDER LITTLE_ENDIAN
#endif
/* #define RT_LWIP_DEBUG */ /* #define RT_LWIP_DEBUG */
#ifdef RT_LWIP_DEBUG #ifdef RT_LWIP_DEBUG

View File

@ -39,6 +39,13 @@
#include <rtthread.h> #include <rtthread.h>
#include <string.h> #include <string.h>
#ifndef BYTE_ORDER
#ifdef RT_USING_BIG_ENDIAN
#define BYTE_ORDER BIG_ENDIAN
#else
#define BYTE_ORDER LITTLE_ENDIAN
#endif /* RT_USING_BIG_ENDIAN */
#endif /* BYTE_ORDER */
#define U16_F "hu" #define U16_F "hu"
#define S16_F "hd" #define S16_F "hd"

View File

@ -36,17 +36,12 @@
#define __ARCH_SYS_ARCH_H__ #define __ARCH_SYS_ARCH_H__
#include "arch/cc.h" #include "arch/cc.h"
#include <rtthread.h> #include <rtthread.h>
#ifndef BYTE_ORDER
#define BYTE_ORDER LITTLE_ENDIAN
#endif
#define SYS_MBOX_NULL RT_NULL #define SYS_MBOX_NULL RT_NULL
#define SYS_SEM_NULL RT_NULL #define SYS_SEM_NULL RT_NULL
typedef u32_t sys_prot_t; typedef rt_uint32_t sys_prot_t;
#define SYS_MBOX_SIZE 10 #define SYS_MBOX_SIZE 10
#define SYS_LWIP_TIMER_NAME "timer" #define SYS_LWIP_TIMER_NAME "timer"

View File

@ -45,10 +45,6 @@
#define LWIP_PLATFORM_BYTESWAP 0 #define LWIP_PLATFORM_BYTESWAP 0
#ifndef BYTE_ORDER
#define BYTE_ORDER LITTLE_ENDIAN
#endif
/* #define RT_LWIP_DEBUG */ /* #define RT_LWIP_DEBUG */
#ifdef RT_LWIP_DEBUG #ifdef RT_LWIP_DEBUG

View File

@ -39,6 +39,14 @@
#include <rtthread.h> #include <rtthread.h>
#include <string.h> #include <string.h>
#ifndef BYTE_ORDER
#ifdef RT_USING_BIG_ENDIAN
#define BYTE_ORDER BIG_ENDIAN
#else
#define BYTE_ORDER LITTLE_ENDIAN
#endif /* RT_USING_BIG_ENDIAN */
#endif /* BYTE_ORDER */
#define U16_F "hu" #define U16_F "hu"
#define S16_F "hd" #define S16_F "hd"
#define X16_F "hx" #define X16_F "hx"

View File

@ -36,17 +36,12 @@
#define __ARCH_SYS_ARCH_H__ #define __ARCH_SYS_ARCH_H__
#include "arch/cc.h" #include "arch/cc.h"
#include <rtthread.h> #include <rtthread.h>
#ifndef BYTE_ORDER
#define BYTE_ORDER LITTLE_ENDIAN
#endif
#define SYS_MBOX_NULL RT_NULL #define SYS_MBOX_NULL RT_NULL
#define SYS_SEM_NULL RT_NULL #define SYS_SEM_NULL RT_NULL
typedef u32_t sys_prot_t; typedef rt_uint32_t sys_prot_t;
#define SYS_MBOX_SIZE 10 #define SYS_MBOX_SIZE 10
#define SYS_LWIP_TIMER_NAME "timer" #define SYS_LWIP_TIMER_NAME "timer"