Merged in antmerlino/nuttx/big-endian (pull request #784)
Fixes usage of CONFIG_BIG_ENDIAN; should be CONFIG_ENDIAN_BIG Approved-by: GregoryN <gnutt@nuttx.org>
This commit is contained in:
parent
b4ab6bc7f2
commit
67c609e343
@ -155,7 +155,7 @@
|
||||
#define ILI9341_MADCTL_LANDSCAPE_MX 0
|
||||
#define ILI9341_MADCTL_LANDSCAPE_MV ILI9341_MEMORY_ACCESS_CONTROL_MV
|
||||
#define ILI9341_MADCTL_LANDSCAPE_ML 0
|
||||
#ifdef CONFIG_BIG_ENDIAN
|
||||
#ifdef CONFIG_ENDIAN_BIG
|
||||
# define ILI9341_MADCTL_LANDSCAPE_BGR 0
|
||||
#else
|
||||
# define ILI9341_MADCTL_LANDSCAPE_BGR ILI9341_MEMORY_ACCESS_CONTROL_BGR
|
||||
@ -183,7 +183,7 @@
|
||||
#define ILI9341_MADCTL_PORTRAIT_MX ILI9341_MEMORY_ACCESS_CONTROL_MX
|
||||
#define ILI9341_MADCTL_PORTRAIT_MV 0
|
||||
#define ILI9341_MADCTL_PORTRAIT_ML 0
|
||||
#ifdef CONFIG_BIG_ENDIAN
|
||||
#ifdef CONFIG_ENDIAN_BIG
|
||||
# define ILI9341_MADCTL_PORTRAIT_BGR 0
|
||||
#else
|
||||
# define ILI9341_MADCTL_PORTRAIT_BGR ILI9341_MEMORY_ACCESS_CONTROL_BGR
|
||||
@ -211,7 +211,7 @@
|
||||
#define ILI9341_MADCTL_RLANDSCAPE_MX ILI9341_MEMORY_ACCESS_CONTROL_MX
|
||||
#define ILI9341_MADCTL_RLANDSCAPE_MV ILI9341_MEMORY_ACCESS_CONTROL_MV
|
||||
#define ILI9341_MADCTL_RLANDSCAPE_ML 0
|
||||
#ifdef CONFIG_BIG_ENDIAN
|
||||
#ifdef CONFIG_ENDIAN_BIG
|
||||
# define ILI9341_MADCTL_RLANDSCAPE_BGR 0
|
||||
#else
|
||||
# define ILI9341_MADCTL_RLANDSCAPE_BGR ILI9341_MEMORY_ACCESS_CONTROL_BGR
|
||||
@ -241,7 +241,7 @@
|
||||
#define ILI9341_MADCTL_RPORTRAIT_MX 0
|
||||
#define ILI9341_MADCTL_RPORTRAIT_MV 0
|
||||
#define ILI9341_MADCTL_RPORTRAIT_ML 0
|
||||
#ifdef CONFIG_BIG_ENDIAN
|
||||
#ifdef CONFIG_ENDIAN_BIG
|
||||
# define ILI9341_MADCTL_RPORTRAIT_BGR 0
|
||||
#else
|
||||
# define ILI9341_MADCTL_RPORTRAIT_BGR ILI9341_MEMORY_ACCESS_CONTROL_BGR
|
||||
|
@ -170,7 +170,7 @@
|
||||
#define ILI9341_MADCTL_LANDSCAPE_MX 0
|
||||
#define ILI9341_MADCTL_LANDSCAPE_MV ILI9341_MEMORY_ACCESS_CONTROL_MV
|
||||
#define ILI9341_MADCTL_LANDSCAPE_ML 0
|
||||
#ifdef CONFIG_BIG_ENDIAN
|
||||
#ifdef CONFIG_ENDIAN_BIG
|
||||
# define ILI9341_MADCTL_LANDSCAPE_BGR 0
|
||||
#else
|
||||
# define ILI9341_MADCTL_LANDSCAPE_BGR ILI9341_MEMORY_ACCESS_CONTROL_BGR
|
||||
@ -198,7 +198,7 @@
|
||||
#define ILI9341_MADCTL_PORTRAIT_MX ILI9341_MEMORY_ACCESS_CONTROL_MX
|
||||
#define ILI9341_MADCTL_PORTRAIT_MV 0
|
||||
#define ILI9341_MADCTL_PORTRAIT_ML ILI9341_MEMORY_ACCESS_CONTROL_ML
|
||||
#ifdef CONFIG_BIG_ENDIAN
|
||||
#ifdef CONFIG_ENDIAN_BIG
|
||||
# define ILI9341_MADCTL_PORTRAIT_BGR 0
|
||||
#else
|
||||
# define ILI9341_MADCTL_PORTRAIT_BGR ILI9341_MEMORY_ACCESS_CONTROL_BGR
|
||||
@ -225,7 +225,7 @@
|
||||
#define ILI9341_MADCTL_RLANDSCAPE_MX ILI9341_MEMORY_ACCESS_CONTROL_MX
|
||||
#define ILI9341_MADCTL_RLANDSCAPE_MV ILI9341_MEMORY_ACCESS_CONTROL_MV
|
||||
#define ILI9341_MADCTL_RLANDSCAPE_ML 0
|
||||
#ifdef CONFIG_BIG_ENDIAN
|
||||
#ifdef CONFIG_ENDIAN_BIG
|
||||
# define ILI9341_MADCTL_RLANDSCAPE_BGR 0
|
||||
#else
|
||||
# define ILI9341_MADCTL_RLANDSCAPE_BGR ILI9341_MEMORY_ACCESS_CONTROL_BGR
|
||||
@ -255,7 +255,7 @@
|
||||
#define ILI9341_MADCTL_RPORTRAIT_MX 0
|
||||
#define ILI9341_MADCTL_RPORTRAIT_MV 0
|
||||
#define ILI9341_MADCTL_RPORTRAIT_ML ILI9341_MEMORY_ACCESS_CONTROL_ML
|
||||
#ifdef CONFIG_BIG_ENDIAN
|
||||
#ifdef CONFIG_ENDIAN_BIG
|
||||
# define ILI9341_MADCTL_RPORTRAIT_BGR 0
|
||||
#else
|
||||
# define ILI9341_MADCTL_RPORTRAIT_BGR ILI9341_MEMORY_ACCESS_CONTROL_BGR
|
||||
|
@ -270,7 +270,7 @@ static uint8_t compress_ipaddr(FAR const net_ipv6addr_t ipaddr, uint8_t bitpos)
|
||||
{
|
||||
/* Compress IID to 16 bits: xxxx:xxxx:xxxx:xxxx:0000:00ff:fe00:XXXX */
|
||||
|
||||
#ifdef CONFIG_BIG_ENDIAN
|
||||
#ifdef CONFIG_ENDIAN_BIG
|
||||
*g_hc06ptr++ = ipaddr[7] >> 8; /* Preserve big-endian, network order */
|
||||
*g_hc06ptr++ = ipaddr[7] & 0xff;
|
||||
#else
|
||||
@ -288,7 +288,7 @@ static uint8_t compress_ipaddr(FAR const net_ipv6addr_t ipaddr, uint8_t bitpos)
|
||||
|
||||
for (i = 4; i < 8; i++)
|
||||
{
|
||||
#ifdef CONFIG_BIG_ENDIAN
|
||||
#ifdef CONFIG_ENDIAN_BIG
|
||||
*g_hc06ptr++ = ipaddr[i] >> 8; /* Preserve big-endian, network order */
|
||||
*g_hc06ptr++ = ipaddr[i] & 0xff;
|
||||
#else
|
||||
@ -498,7 +498,7 @@ static void uncompress_addr(FAR const struct netdev_varaddr_s *addr,
|
||||
|
||||
if ((postcount & 1) != 0)
|
||||
{
|
||||
#ifdef CONFIG_BIG_ENDIAN
|
||||
#ifdef CONFIG_ENDIAN_BIG
|
||||
/* Preserve big-endian, network order */
|
||||
|
||||
ipaddr[destndx - 1] = (uint16_t)(*srcptr) << 8;
|
||||
@ -513,7 +513,7 @@ static void uncompress_addr(FAR const struct netdev_varaddr_s *addr,
|
||||
|
||||
for (i = destndx; i < 8; i++)
|
||||
{
|
||||
#ifdef CONFIG_BIG_ENDIAN
|
||||
#ifdef CONFIG_ENDIAN_BIG
|
||||
/* Preserve big-endian, network order */
|
||||
|
||||
ipaddr[i] = (uint16_t)srcptr[0] << 8 | (uint16_t)srcptr[1];
|
||||
|
Loading…
Reference in New Issue
Block a user