USRP Hardware Driver and USRP Manual
Version: 3.15.0.0-2+b1
UHD and USRP Manual
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
#ifndef INCLUDED_UHD_TYPES_ENDIANNESS_HPP
9
#define INCLUDED_UHD_TYPES_ENDIANNESS_HPP
10
11
#include <
uhd/config.hpp
>
12
13
/******************************************************************************
14
* Detect host endianness
15
*****************************************************************************/
16
#include <boost/predef/other/endian.h>
17
18
// In Boost 1.55, the meaning of the macros changed. They are now always
19
// defined, but don't always have the same value.
20
#if BOOST_ENDIAN_BIG_BYTE
21
# define UHD_BIG_ENDIAN
22
#elif BOOST_ENDIAN_LITTLE_BYTE
23
# define UHD_LITTLE_ENDIAN
24
#else
25
# error "Unsupported endianness!"
26
#endif
27
28
29
namespace
uhd
{
30
31
enum
endianness_t
{
ENDIANNESS_BIG
,
ENDIANNESS_LITTLE
};
32
33
}
// namespace uhd
34
35
#endif
/* INCLUDED_UHD_TYPES_ENDIANNESS_HPP */
uhd::ENDIANNESS_LITTLE
Definition:
endianness.hpp:32
config.hpp
uhd::endianness_t
endianness_t
Definition:
endianness.hpp:31
uhd::ENDIANNESS_BIG
Definition:
endianness.hpp:32
uhd
Definition:
build_info.hpp:13
include
uhd
types
endianness.hpp
Generated by
1.8.16