Macros and functions for automatic endianness conversion.
More...
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.
- Note
- This macro is designed for run-time conversion of data - for compile-time endianness conversion, use BE16_TO_CPU instead.
- Parameters
-
[in] | x | Data to perform the endianness conversion on. |
- Returns
- Endian corrected version of the input value.
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.
- Note
- This macro is designed for compile-time conversion of data - for run-time endianness conversion, use be16_to_cpu instead.
- Parameters
-
[in] | x | Data to perform the endianness conversion on. |
- Returns
- Endian corrected version of the input value.
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.
- Note
- This macro is designed for run-time conversion of data - for compile-time endianness conversion, use BE32_TO_CPU instead.
- Parameters
-
[in] | x | Data to perform the endianness conversion on. |
- Returns
- Endian corrected version of the input value.
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.
- Note
- This macro is designed for compile-time conversion of data - for run-time endianness conversion, use be32_to_cpu instead.
- Parameters
-
[in] | x | Data to perform the endianness conversion on. |
- Returns
- Endian corrected version of the input value.
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.
- Note
- This macro is designed for run-time conversion of data - for compile-time endianness conversion, use CPU_TO_BE16 instead.
- Parameters
-
[in] | x | Data to perform the endianness conversion on. |
- Returns
- Endian corrected version of the input value.
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.
- Note
- This macro is designed for compile-time conversion of data - for run-time endianness conversion, use cpu_to_be16 instead.
- Parameters
-
[in] | x | Data to perform the endianness conversion on. |
- Returns
- Endian corrected version of the input value.
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.
- Note
- This macro is designed for run-time conversion of data - for compile-time endianness conversion, use CPU_TO_BE32 instead.
- Parameters
-
[in] | x | Data to perform the endianness conversion on. |
- Returns
- Endian corrected version of the input value.
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.
- Note
- This macro is designed for compile-time conversion of data - for run-time endianness conversion, use cpu_to_be32 instead.
- Parameters
-
[in] | x | Data to perform the endianness conversion on. |
- Returns
- Endian corrected version of the input value.
#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.
- Note
- This macro is designed for run-time conversion of data - for compile-time endianness conversion, use CPU_TO_LE16 instead.
- Parameters
-
[in] | x | Data to perform the endianness conversion on. |
- Returns
- Endian corrected version of the input value.
#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.
- Note
- This macro is designed for compile-time conversion of data - for run-time endianness conversion, use cpu_to_le16 instead.
- Parameters
-
[in] | x | Data to perform the endianness conversion on. |
- Returns
- Endian corrected version of the input value.
#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.
- Note
- This macro is designed for run-time conversion of data - for compile-time endianness conversion, use CPU_TO_LE32 instead.
- Parameters
-
[in] | x | Data to perform the endianness conversion on. |
- Returns
- Endian corrected version of the input value.
#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.
- Note
- This macro is designed for compile-time conversion of data - for run-time endianness conversion, use cpu_to_le32 instead.
- Parameters
-
[in] | x | Data to perform the endianness conversion on. |
- Returns
- Endian corrected version of the input value.
#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.
- Note
- This macro is designed for run-time conversion of data - for compile-time endianness conversion, use LE16_TO_CPU instead.
- Parameters
-
[in] | x | Data to perform the endianness conversion on. |
- Returns
- Endian corrected version of the input value.
#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.
- Note
- This macro is designed for compile-time conversion of data - for run time endianness conversion, use le16_to_cpu instead.
- Parameters
-
[in] | x | Data to perform the endianness conversion on. |
- Returns
- Endian corrected version of the input value.
#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.
- Note
- This macro is designed for run-time conversion of data - for compile-time endianness conversion, use LE32_TO_CPU instead.
- Parameters
-
[in] | x | Data to perform the endianness conversion on. |
- Returns
- Endian corrected version of the input value.
#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.
- Note
- This macro is designed for compile-time conversion of data - for run time endianness conversion, use le32_to_cpu instead.
- Parameters
-
[in] | x | Data to perform the endianness conversion on. |
- Returns
- Endian corrected version of the input value.