#include <assert.h>
#include <byteswap.h>
#include <stdint.h>
#include "ldastoolsal/types.hh"
◆ BSWAP_8
#define BSWAP_8 |
( |
|
x | ) |
( (x)&0xff ) |
◆ bswap() [1/2]
◆ bswap() [2/2]
template<>
uint32_t bswap |
( |
uint32_t |
Source | ) |
|
|
inline |
◆ reverse()
template<size_t SIZE>
void reverse |
( |
void * |
s, |
|
|
size_t |
n |
|
) |
| |
Reverse Byte Order.
- Parameters
-
◆ reverse< 1 >()
Reverse 1 byte.
This does nothing.
- Parameters
-
◆ reverse< 12U >()
Reverse 12 bytes.
Reverses the order of twelve bytes. This is a template specialization.
- Parameters
-
[in,out] | s | This is the collection of data on which the bytes need to be swapped. |
[in] | n | The number of elements in the collection. |
◆ reverse< 16U >()
Reverse 16 bytes.
Reverses the order of sixteen bytes. This is a template specialization.
- Parameters
-
[in,out] | s | This is the collection of data on which the bytes need to be swapped. |
[in] | n | The number of elements in the collection. |
◆ reverse< 2 >()
Reverse 2 bytes.
Reverses the order of two bytes. This is a template specialization.
- Parameters
-
[in,out] | dest | This is the collection of data on which the bytes need to be swapped. |
[in] | n | The number of elements in the collection. |
◆ reverse< 36U >()
Reverse 36 bytes.
Reverses the order of thirty six bytes. This is a template specialization.
- Parameters
-
[in,out] | s | This is the collection of data on which the bytes need to be swapped. |
[in] | n | The number of elements in the collection. |
◆ reverse< 4 >()
Reverse 4 bytes.
Reverses the order of four bytes. This is a template specialization.
- Parameters
-
[in,out] | dest | This is the collection of data on which the bytes need to be swapped. |
[in] | n | The number of elements in the collection. |
◆ reverse< 8 >()
Reverse 8 bytes.
Reverses the order of eight bytes. This is a template specialization.
- Parameters
-
[in,out] | dest | This is the collection of data on which the bytes need to be swapped. |
[in] | n | The number of elements in the collection. |