USRP Hardware Driver and USRP Manual Version: 4.1.0.1
UHD and USRP Manual
rfnoc_types.hpp
Go to the documentation of this file.
1//
2// Copyright 2019 Ettus Research, a National Instruments Brand
3//
4// SPDX-License-Identifier: GPL-3.0-or-later
5//
6
7#pragma once
8
9#include <cstddef>
10#include <cstdint>
11
12namespace uhd { namespace rfnoc {
13
14//----------------------------------------------
15// Types
16//----------------------------------------------
17
21constexpr size_t chdr_w_to_bits(chdr_w_t chdr_w)
22{
23 switch (chdr_w) {
24 case CHDR_W_64:
25 return 64;
26 case CHDR_W_128:
27 return 128;
28 case CHDR_W_256:
29 return 256;
30 case CHDR_W_512:
31 return 512;
32 default:
33 return 0;
34 }
35}
36
38using sep_id_t = uint16_t;
39
40}} // namespace uhd::rfnoc
uint16_t sep_id_t
Stream Endpoint ID Type.
Definition: rfnoc_types.hpp:38
chdr_w_t
Type that indicates the CHDR Width in bits.
Definition: rfnoc_types.hpp:19
@ CHDR_W_128
Definition: rfnoc_types.hpp:19
@ CHDR_W_256
Definition: rfnoc_types.hpp:19
@ CHDR_W_512
Definition: rfnoc_types.hpp:19
@ CHDR_W_64
Definition: rfnoc_types.hpp:19
constexpr size_t chdr_w_to_bits(chdr_w_t chdr_w)
Conversion from chdr_w_t to a number of bits.
Definition: rfnoc_types.hpp:21
Definition: build_info.hpp:12