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/usrp/dboard/twinrx/twinrx_gain_tables.hpp | |
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/usrp/dboard/twinrx/twinrx_gain_tables.hpp')
-rw-r--r-- | host/lib/usrp/dboard/twinrx/twinrx_gain_tables.hpp | 63 |
1 files changed, 36 insertions, 27 deletions
diff --git a/host/lib/usrp/dboard/twinrx/twinrx_gain_tables.hpp b/host/lib/usrp/dboard/twinrx/twinrx_gain_tables.hpp index 94469ab0b..f02241745 100644 --- a/host/lib/usrp/dboard/twinrx/twinrx_gain_tables.hpp +++ b/host/lib/usrp/dboard/twinrx/twinrx_gain_tables.hpp @@ -8,56 +8,65 @@ #ifndef INCLUDED_DBOARD_TWINRX_GAIN_TABLES_HPP #define INCLUDED_DBOARD_TWINRX_GAIN_TABLES_HPP +#include "twinrx_ctrl.hpp" #include <uhd/config.hpp> -#include <stdint.h> #include <uhd/types/ranges.hpp> -#include "twinrx_ctrl.hpp" +#include <stdint.h> namespace uhd { namespace usrp { namespace dboard { namespace twinrx { -class twinrx_gain_config_t { +class twinrx_gain_config_t +{ public: - twinrx_gain_config_t( - size_t index_, double sys_gain_, - uint8_t atten1_, uint8_t atten2_, - bool amp1_, bool amp2_ - ): index(index_), sys_gain(sys_gain_), atten1(atten1_), atten2(atten2_), - amp1(amp1_), amp2(amp2_) - {} + twinrx_gain_config_t(size_t index_, + double sys_gain_, + uint8_t atten1_, + uint8_t atten2_, + bool amp1_, + bool amp2_) + : index(index_) + , sys_gain(sys_gain_) + , atten1(atten1_) + , atten2(atten2_) + , amp1(amp1_) + , amp2(amp2_) + { + } - twinrx_gain_config_t& operator=(const twinrx_gain_config_t& src) { + twinrx_gain_config_t& operator=(const twinrx_gain_config_t& src) + { if (this != &src) { - this->index = src.index; + this->index = src.index; this->sys_gain = src.sys_gain; - this->atten1 = src.atten1; - this->atten2 = src.atten2; - this->amp1 = src.amp1; - this->amp2 = src.amp2; + this->atten1 = src.atten1; + this->atten2 = src.atten2; + this->amp1 = src.amp1; + this->amp2 = src.amp2; } return *this; } - size_t index; - double sys_gain; + size_t index; + double sys_gain; uint8_t atten1; uint8_t atten2; - bool amp1; - bool amp2; + bool amp1; + bool amp2; }; -class twinrx_gain_table { +class twinrx_gain_table +{ public: - static const twinrx_gain_table lookup_table( - twinrx_ctrl::signal_path_t signal_path, + static const twinrx_gain_table lookup_table(twinrx_ctrl::signal_path_t signal_path, twinrx_ctrl::preselector_path_t presel_path, std::string profile); - twinrx_gain_table(const std::vector<twinrx_gain_config_t>& tbl) - : _tbl(tbl) {} + twinrx_gain_table(const std::vector<twinrx_gain_config_t>& tbl) : _tbl(tbl) {} const twinrx_gain_config_t& find_by_index(size_t index) const; - inline size_t get_num_entries() const { + inline size_t get_num_entries() const + { return _tbl.size(); } @@ -68,6 +77,6 @@ private: }; -}}}} //namespaces +}}}} // namespace uhd::usrp::dboard::twinrx #endif /* INCLUDED_DBOARD_TWINRX_GAIN_TABLES_HPP */ |