| USRP Hardware Driver and USRP Manual Version: 4.8.0.makepkg-0-g308126a4 UHD and USRP Manual |

Loading...
Searching...
No Matches
endianness.hpp
Go to the documentation of this file.
1//
2// Copyright 2014 Ettus Research LLC
3// Copyright 2018 Ettus Research, a National Instruments Company
4//
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
7
8#pragma once
9
10#include <uhd/config.hpp>
11
12/******************************************************************************
13 * Detect host endianness
14 *****************************************************************************/
15#include <boost/predef/other/endian.h>
16
17// In Boost 1.55, the meaning of the macros changed. They are now always
18// defined, but don't always have the same value.
19#if BOOST_ENDIAN_BIG_BYTE
20# define UHD_BIG_ENDIAN
21#elif BOOST_ENDIAN_LITTLE_BYTE
22# define UHD_LITTLE_ENDIAN
23#else
24# error "Unsupported endianness!"
25#endif
26
27
28 namespace uhd {
29
30 enum endianness_t { ENDIANNESS_BIG, ENDIANNESS_LITTLE };
31
32} // namespace uhd
config.hpp
uhd
Definition build_info.hpp:12
uhd::endianness_t
endianness_t
Definition endianness.hpp:30
uhd::ENDIANNESS_LITTLE
@ ENDIANNESS_LITTLE
Definition endianness.hpp:30
uhd::ENDIANNESS_BIG
@ ENDIANNESS_BIG
Definition endianness.hpp:30