|
roo_io
API Documentation for roo_io
|
Convert Endianness of shorts, longs, long longs, regardless of architecture/OS. More...
#include <stdlib.h>#include <stdint.h>Go to the source code of this file.
Functions | |
| static uint16_t | bswap16 (uint16_t x) |
| static uint32_t | bswap32 (uint32_t x) |
| static uint64_t | bswap64 (uint64_t x) |
| static float | bswapf (float f) |
| Byte-swap 32-bit float. | |
| static double | bswapd (double d) |
| Byte-swap 64-bit double. | |
Convert Endianness of shorts, longs, long longs, regardless of architecture/OS.
Defines (without pulling in platform-specific network include headers): bswap16, bswap32, bswap64, ntoh16, hton16, ntoh32 hton32, ntoh64, hton64
Should support linux / macos / solaris / windows. Supports GCC (on any platform, including embedded), MSVC2015, and clang, and should support intel, solaris, and ibm compilers as well.
Copyright 2020 github user jtbr, Released under MIT license
SPDX-License-Identifier: MIT OR Apache-2.0
Definition in file endianness.h.
|
inlinestatic |
Definition at line 92 of file endianness.h.
Referenced by roo_io::byte_order::Swapper< uint16_t >::operator()().
|
inlinestatic |
Definition at line 95 of file endianness.h.
Referenced by bswapf(), and roo_io::byte_order::Swapper< uint32_t >::operator()().
|
inlinestatic |
Definition at line 101 of file endianness.h.
Referenced by bswapd(), and roo_io::byte_order::Swapper< uint64_t >::operator()().
|
inlinestatic |
|
inlinestatic |