![]() |
LPCOpen Platform
LPCOpen Platform for NXP LPC Microcontrollers
|
Macros and functions for automatic endianness conversion. More...
Run-time endianness conversion | |
#define | le16_to_cpu(x) (x) |
#define | le32_to_cpu(x) (x) |
#define | be16_to_cpu(x) SwapEndian_16(x) |
#define | be32_to_cpu(x) SwapEndian_32(x) |
#define | cpu_to_le16(x) (x) |
#define | cpu_to_le32(x) (x) |
#define | cpu_to_be16(x) SwapEndian_16(x) |
#define | cpu_to_be32(x) SwapEndian_32(x) |
Compile-time endianness conversion | |
#define | LE16_TO_CPU(x) (x) |
#define | LE32_TO_CPU(x) (x) |
#define | BE16_TO_CPU(x) SWAPENDIAN_16(x) |
#define | BE32_TO_CPU(x) SWAPENDIAN_32(x) |
#define | CPU_TO_LE16(x) (x) |
#define | CPU_TO_LE32(x) (x) |
#define | CPU_TO_BE16(x) SWAPENDIAN_16(x) |
#define | CPU_TO_BE32(x) SWAPENDIAN_32(x) |
Macros and functions for automatic endianness conversion.
#define be16_to_cpu | ( | x | ) | SwapEndian_16(x) |
Performs a conversion between a Big Endian encoded 16-bit piece of data and the Endianness of the currently selected CPU architecture.
On big endian architectures, this macro does nothing.
x | Data to perform the endianness conversion on. |
Definition at line 167 of file Endianness.h.
#define BE16_TO_CPU | ( | x | ) | SWAPENDIAN_16(x) |
Performs a conversion between a Big Endian encoded 16-bit piece of data and the Endianness of the currently selected CPU architecture.
On big endian architectures, this macro does nothing.
x | Data to perform the endianness conversion on. |
Definition at line 300 of file Endianness.h.
#define be32_to_cpu | ( | x | ) | SwapEndian_32(x) |
Performs a conversion between a Big Endian encoded 32-bit piece of data and the Endianness of the currently selected CPU architecture.
On big endian architectures, this macro does nothing.
x | Data to perform the endianness conversion on. |
Definition at line 183 of file Endianness.h.
#define BE32_TO_CPU | ( | x | ) | SWAPENDIAN_32(x) |
Performs a conversion between a Big Endian encoded 32-bit piece of data and the Endianness of the currently selected CPU architecture.
On big endian architectures, this macro does nothing.
x | Data to perform the endianness conversion on. |
Definition at line 316 of file Endianness.h.
#define cpu_to_be16 | ( | x | ) | SwapEndian_16(x) |
Performs a conversion on a natively encoded 16-bit piece of data to ensure that it is in Big Endian format regardless of the currently selected CPU architecture.
On big endian architectures, this macro does nothing.
x | Data to perform the endianness conversion on. |
Definition at line 231 of file Endianness.h.
#define CPU_TO_BE16 | ( | x | ) | SWAPENDIAN_16(x) |
Performs a conversion on a natively encoded 16-bit piece of data to ensure that it is in Big Endian format regardless of the currently selected CPU architecture.
On big endian architectures, this macro does nothing.
x | Data to perform the endianness conversion on. |
Definition at line 364 of file Endianness.h.
#define cpu_to_be32 | ( | x | ) | SwapEndian_32(x) |
Performs a conversion on a natively encoded 32-bit piece of data to ensure that it is in Big Endian format regardless of the currently selected CPU architecture.
On big endian architectures, this macro does nothing.
x | Data to perform the endianness conversion on. |
Definition at line 247 of file Endianness.h.
#define CPU_TO_BE32 | ( | x | ) | SWAPENDIAN_32(x) |
Performs a conversion on a natively encoded 32-bit piece of data to ensure that it is in Big Endian format regardless of the currently selected CPU architecture.
On big endian architectures, this macro does nothing.
x | Data to perform the endianness conversion on. |
Definition at line 380 of file Endianness.h.
#define cpu_to_le16 | ( | x | ) | (x) |
Performs a conversion on a natively encoded 16-bit piece of data to ensure that it is in Little Endian format regardless of the currently selected CPU architecture.
On little endian architectures, this macro does nothing.
x | Data to perform the endianness conversion on. |
Definition at line 199 of file Endianness.h.
#define CPU_TO_LE16 | ( | x | ) | (x) |
Performs a conversion on a natively encoded 16-bit piece of data to ensure that it is in Little Endian format regardless of the currently selected CPU architecture.
On little endian architectures, this macro does nothing.
x | Data to perform the endianness conversion on. |
Definition at line 332 of file Endianness.h.
#define cpu_to_le32 | ( | x | ) | (x) |
Performs a conversion on a natively encoded 32-bit piece of data to ensure that it is in Little Endian format regardless of the currently selected CPU architecture.
On little endian architectures, this macro does nothing.
x | Data to perform the endianness conversion on. |
Definition at line 215 of file Endianness.h.
#define CPU_TO_LE32 | ( | x | ) | (x) |
Performs a conversion on a natively encoded 32-bit piece of data to ensure that it is in Little Endian format regardless of the currently selected CPU architecture.
On little endian architectures, this macro does nothing.
x | Data to perform the endianness conversion on. |
Definition at line 348 of file Endianness.h.
#define le16_to_cpu | ( | x | ) | (x) |
Performs a conversion between a Little Endian encoded 16-bit piece of data and the Endianness of the currently selected CPU architecture.
On little endian architectures, this macro does nothing.
x | Data to perform the endianness conversion on. |
Definition at line 135 of file Endianness.h.
#define LE16_TO_CPU | ( | x | ) | (x) |
Performs a conversion between a Little Endian encoded 16-bit piece of data and the Endianness of the currently selected CPU architecture.
On little endian architectures, this macro does nothing.
x | Data to perform the endianness conversion on. |
Definition at line 268 of file Endianness.h.
#define le32_to_cpu | ( | x | ) | (x) |
Performs a conversion between a Little Endian encoded 32-bit piece of data and the Endianness of the currently selected CPU architecture.
On little endian architectures, this macro does nothing.
x | Data to perform the endianness conversion on. |
Definition at line 151 of file Endianness.h.
#define LE32_TO_CPU | ( | x | ) | (x) |
Performs a conversion between a Little Endian encoded 32-bit piece of data and the Endianness of the currently selected CPU architecture.
On little endian architectures, this macro does nothing.
x | Data to perform the endianness conversion on. |
Definition at line 284 of file Endianness.h.