diff options
author | Martin Braun <martin.braun@ettus.com> | 2020-03-02 15:25:13 -0800 |
---|---|---|
committer | atrnati <54334261+atrnati@users.noreply.github.com> | 2020-03-03 08:51:32 -0600 |
commit | 876d4150aa3da531ddd687b48afada6e43f79146 (patch) | |
tree | fd72a71419f4cd800d4e500cfcaded4dfc8dc367 /host/lib/rfnoc/null_block_control.cpp | |
parent | 1393553d623bdf4ba40d5435c9719b6ce990d9ac (diff) | |
download | uhd-876d4150aa3da531ddd687b48afada6e43f79146.tar.gz uhd-876d4150aa3da531ddd687b48afada6e43f79146.tar.bz2 uhd-876d4150aa3da531ddd687b48afada6e43f79146.zip |
uhd: Apply clang-format against all .cpp and .hpp files in host/
Note: template_lvbitx.{cpp,hpp} need to be excluded from the list of
files that clang-format gets applied against.
Diffstat (limited to 'host/lib/rfnoc/null_block_control.cpp')
-rw-r--r-- | host/lib/rfnoc/null_block_control.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/host/lib/rfnoc/null_block_control.cpp b/host/lib/rfnoc/null_block_control.cpp index 443c2f3d7..8a5ab56a5 100644 --- a/host/lib/rfnoc/null_block_control.cpp +++ b/host/lib/rfnoc/null_block_control.cpp @@ -4,9 +4,9 @@ // SPDX-License-Identifier: GPL-3.0-or-later // +#include <uhd/rfnoc/defaults.hpp> #include <uhd/rfnoc/null_block_control.hpp> #include <uhd/rfnoc/registry.hpp> -#include <uhd/rfnoc/defaults.hpp> #include <atomic> namespace { @@ -41,9 +41,9 @@ public: RFNOC_BLOCK_CONSTRUCTOR(null_block_control) { uint32_t initial_state = regs().peek32(REG_CTRL_STATUS); - _streaming = initial_state & 0x2; - _nipc = (initial_state >> 24) & 0xFF; - _item_width = (initial_state >> 16) & 0xFF; + _streaming = initial_state & 0x2; + _nipc = (initial_state >> 24) & 0xFF; + _item_width = (initial_state >> 16) & 0xFF; reset_counters(); register_issue_stream_cmd(); } @@ -121,17 +121,17 @@ public: return regs().peek32(REG_SRC_THROTTLE_CYC); } - uint64_t get_count( - const port_type_t port_type, const count_type_t count_type) + uint64_t get_count(const port_type_t port_type, const count_type_t count_type) { - const uint32_t count_addr_lo = [&](){ + const uint32_t count_addr_lo = [&]() { switch (port_type) { case SOURCE: return count_type == LINES ? REG_SRC_LINE_CNT_LO : REG_SRC_PKT_CNT_LO; case SINK: return count_type == LINES ? REG_SNK_LINE_CNT_LO : REG_SNK_PKT_CNT_LO; case LOOP: - return count_type == LINES ? REG_LOOP_LINE_CNT_LO : REG_LOOP_PKT_CNT_LO; + return count_type == LINES ? REG_LOOP_LINE_CNT_LO + : REG_LOOP_PKT_CNT_LO; default: UHD_THROW_INVALID_CODE_PATH(); } @@ -140,7 +140,6 @@ public: } private: - /*! Action API: Register a handler for stream commands */ void register_issue_stream_cmd() |