diff options
author | Martin Braun <martin.braun@ettus.com> | 2021-01-08 09:33:36 +0100 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2021-03-04 08:07:26 -0600 |
commit | 107a49c0c236940da7d3bd0f57da4bc1e2a34cb4 (patch) | |
tree | fdeaad56030a02948377c45838dab97beb7a5c84 /host/lib/rfnoc/null_block_control.cpp | |
parent | 7d5e48032baa62cbe7467833b9e057900602f4b9 (diff) | |
download | uhd-107a49c0c236940da7d3bd0f57da4bc1e2a34cb4.tar.gz uhd-107a49c0c236940da7d3bd0f57da4bc1e2a34cb4.tar.bz2 uhd-107a49c0c236940da7d3bd0f57da4bc1e2a34cb4.zip |
host: Update code base using clang-tidy
The checks from the new clang-tidy file are applied to the source tree
using:
$ find . -name "*.cpp" | sort -u | xargs \
--max-procs 8 --max-args 1 clang-tidy --format-style=file \
--fix -p /path/to/compile_commands.json
Diffstat (limited to 'host/lib/rfnoc/null_block_control.cpp')
-rw-r--r-- | host/lib/rfnoc/null_block_control.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/host/lib/rfnoc/null_block_control.cpp b/host/lib/rfnoc/null_block_control.cpp index ba8ec8da4..bb5fe2ea9 100644 --- a/host/lib/rfnoc/null_block_control.cpp +++ b/host/lib/rfnoc/null_block_control.cpp @@ -51,7 +51,7 @@ public: register_issue_stream_cmd(); } - void issue_stream_cmd(const stream_cmd_t& stream_cmd) + void issue_stream_cmd(const stream_cmd_t& stream_cmd) override { if (stream_cmd.stream_mode == stream_cmd_t::STREAM_MODE_START_CONTINUOUS) { RFNOC_LOG_TRACE("Received start stream request!"); @@ -66,7 +66,7 @@ public: } } - void reset_counters() + void reset_counters() override { const uint32_t streaming_flag = _streaming ? 0x2 : 0x0; regs().poke32(REG_CTRL_STATUS, streaming_flag | 0x1); @@ -88,7 +88,7 @@ public: regs().poke32(REG_SRC_LINES_PER_PKT, lpp - 2); } - void set_bytes_per_packet(const uint32_t bpp) + void set_bytes_per_packet(const uint32_t bpp) override { if (bpp > 0xFFFF) { throw uhd::value_error("Null source lines per packet cannot exceed 16 bits!"); @@ -101,7 +101,7 @@ public: set_lines_per_packet(lpp); } - void set_throttle_cycles(const uint32_t cycs) + void set_throttle_cycles(const uint32_t cycs) override { if (cycs > 0x3FF) { throw uhd::value_error("Null source throttle cycles cannot exceed 10 bits!"); @@ -119,22 +119,23 @@ public: return _nipc; } - uint32_t get_lines_per_packet() + uint32_t get_lines_per_packet() override { return regs().peek32(REG_SRC_LINES_PER_PKT) + 2; } - uint32_t get_bytes_per_packet() + uint32_t get_bytes_per_packet() override { return regs().peek32(REG_SRC_BYTES_PER_PKT); } - uint32_t get_throttle_cycles() + uint32_t get_throttle_cycles() override { 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) override { const uint32_t count_addr_lo = [&]() { switch (port_type) { @@ -174,7 +175,7 @@ private: }); } - void deinit() + void deinit() override { issue_stream_cmd(stream_cmd_t::STREAM_MODE_STOP_CONTINUOUS); } |