aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/dboard/magnesium/magnesium_bands.cpp
diff options
context:
space:
mode:
authorBrent Stapleton <brent.stapleton@ettus.com>2019-01-14 10:35:25 -0800
committerBrent Stapleton <brent.stapleton@ettus.com>2019-01-16 11:40:23 -0800
commit967be2a4e82b1a125b26bb72a60318a4fb2b50c4 (patch)
tree8a24954b54d1546dc8049a17e485adb0a605f74f /host/lib/usrp/dboard/magnesium/magnesium_bands.cpp
parentaafe4e8b742a0e21d3818f21f34e3c8613132530 (diff)
downloaduhd-967be2a4e82b1a125b26bb72a60318a4fb2b50c4.tar.gz
uhd-967be2a4e82b1a125b26bb72a60318a4fb2b50c4.tar.bz2
uhd-967be2a4e82b1a125b26bb72a60318a4fb2b50c4.zip
uhd: mpm: apply clang-format to all files
Applying formatting changes to all .cpp and .hpp files in the following directories: ``` find host/examples/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/tests/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/lib/usrp/dboard/neon/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/lib/usrp/dboard/magnesium/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/lib/usrp/device3/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/lib/usrp/mpmd/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/lib/usrp/x300/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/utils/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find mpm/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file ``` Also formatted host/include/, except Cpp03 was used as a the language standard instead of Cpp11. ``` sed -i 's/ Cpp11/ Cpp03/g' .clang-format find host/include/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file ``` Formatting style was designated by the .clang-format file.
Diffstat (limited to 'host/lib/usrp/dboard/magnesium/magnesium_bands.cpp')
-rw-r--r--host/lib/usrp/dboard/magnesium/magnesium_bands.cpp125
1 files changed, 63 insertions, 62 deletions
diff --git a/host/lib/usrp/dboard/magnesium/magnesium_bands.cpp b/host/lib/usrp/dboard/magnesium/magnesium_bands.cpp
index 656543653..4792dcac6 100644
--- a/host/lib/usrp/dboard/magnesium/magnesium_bands.cpp
+++ b/host/lib/usrp/dboard/magnesium/magnesium_bands.cpp
@@ -6,8 +6,8 @@
// The band plan
-#include "magnesium_radio_ctrl_impl.hpp"
#include "magnesium_constants.hpp"
+#include "magnesium_radio_ctrl_impl.hpp"
#include <uhd/utils/math.hpp>
/*
@@ -43,66 +43,67 @@ using namespace uhd::rfnoc;
using namespace uhd::math::fp_compare;
namespace {
- /* Note on the RX filter bank:
- *
- * The RX path has 7 bands, which we call BAND0 through BAND7. BAND0 is the
- * lowest frequency band (it goes through F44, the 490 MHz low pass filter,
- * on the first channel). BAND7 is the highest frequency band, it goes
- * through the 2.7 GHz high pass filter (F43 on the first channel).
- *
- * For all frequencies, there are gain values where we bypass the filter
- * bank. In this case, the band setting does not apply (does not have any
- * meaning).
- *
- * The lowband, when not disabling the filter bank, always goes through
- * BAND0, but there are non-lowband frequencies which can also go through
- * BAND0.
- *
- * The following constants define lower cutoff frequencies for each band.
- * BAND0 does not have a lower cutoff frequency, it is implied by
- * MAGNESIUM_MIN_FREQ. MAGNESIUM_RX_BAND1_MIN_FREQ is the cutover frequency
- * for switching from BAND0 to BAND1, and so on.
- *
- * Bands 1-6 have both high- and low-pass filters (effectively band
- * passes). Frequencies need to be chosen to allow as much of the full
- * bandwidth through unattenuated.
- */
- constexpr double MAGNESIUM_RX_BAND1_MIN_FREQ = 430e6;
- constexpr double MAGNESIUM_RX_BAND2_MIN_FREQ = 600e6;
- constexpr double MAGNESIUM_RX_BAND3_MIN_FREQ = 1050e6;
- constexpr double MAGNESIUM_RX_BAND4_MIN_FREQ = 1600e6;
- constexpr double MAGNESIUM_RX_BAND5_MIN_FREQ = 2100e6;
- constexpr double MAGNESIUM_RX_BAND6_MIN_FREQ = 2700e6;
+/* Note on the RX filter bank:
+ *
+ * The RX path has 7 bands, which we call BAND0 through BAND7. BAND0 is the
+ * lowest frequency band (it goes through F44, the 490 MHz low pass filter,
+ * on the first channel). BAND7 is the highest frequency band, it goes
+ * through the 2.7 GHz high pass filter (F43 on the first channel).
+ *
+ * For all frequencies, there are gain values where we bypass the filter
+ * bank. In this case, the band setting does not apply (does not have any
+ * meaning).
+ *
+ * The lowband, when not disabling the filter bank, always goes through
+ * BAND0, but there are non-lowband frequencies which can also go through
+ * BAND0.
+ *
+ * The following constants define lower cutoff frequencies for each band.
+ * BAND0 does not have a lower cutoff frequency, it is implied by
+ * MAGNESIUM_MIN_FREQ. MAGNESIUM_RX_BAND1_MIN_FREQ is the cutover frequency
+ * for switching from BAND0 to BAND1, and so on.
+ *
+ * Bands 1-6 have both high- and low-pass filters (effectively band
+ * passes). Frequencies need to be chosen to allow as much of the full
+ * bandwidth through unattenuated.
+ */
+constexpr double MAGNESIUM_RX_BAND1_MIN_FREQ = 430e6;
+constexpr double MAGNESIUM_RX_BAND2_MIN_FREQ = 600e6;
+constexpr double MAGNESIUM_RX_BAND3_MIN_FREQ = 1050e6;
+constexpr double MAGNESIUM_RX_BAND4_MIN_FREQ = 1600e6;
+constexpr double MAGNESIUM_RX_BAND5_MIN_FREQ = 2100e6;
+constexpr double MAGNESIUM_RX_BAND6_MIN_FREQ = 2700e6;
- /* Note on the TX filter bank:
- *
- * The TX path has 4 bands, which we call BAND0 through BAND3.
- * For all frequencies, there are gain values where we bypass the filter
- * bank. In this case, the band setting does not apply (does not have any
- * meaning).
- *
- * The lowband, when not disabling the filter bank, always goes through
- * BAND0, but there are non-lowband frequencies which can also go through
- * BAND0.
- *
- * The following constants define lower cutoff frequencies for each band.
- * BAND0 does not have a lower cutoff frequency, it is implied by
- * MAGNESIUM_MIN_FREQ. MAGNESIUM_TX_BAND1_MIN_FREQ is the cutover frequency
- * for switching from BAND0 to BAND1, and so on.
- *
- * On current Magnesium revisions, all filters on the TX filter bank are
- * low pass filters (no high pass filters).
- * Frequencies need to be chosen to allow as much of the full bandwidth
- * through unattenuated (so don't go all the way up to the cutoff frequency
- * of that filter, OK).
- */
- constexpr double MAGNESIUM_TX_BAND1_MIN_FREQ = 723.17e6;
- constexpr double MAGNESIUM_TX_BAND2_MIN_FREQ = 1623.17e6;
- constexpr double MAGNESIUM_TX_BAND3_MIN_FREQ = 3323.17e6;
-}
+/* Note on the TX filter bank:
+ *
+ * The TX path has 4 bands, which we call BAND0 through BAND3.
+ * For all frequencies, there are gain values where we bypass the filter
+ * bank. In this case, the band setting does not apply (does not have any
+ * meaning).
+ *
+ * The lowband, when not disabling the filter bank, always goes through
+ * BAND0, but there are non-lowband frequencies which can also go through
+ * BAND0.
+ *
+ * The following constants define lower cutoff frequencies for each band.
+ * BAND0 does not have a lower cutoff frequency, it is implied by
+ * MAGNESIUM_MIN_FREQ. MAGNESIUM_TX_BAND1_MIN_FREQ is the cutover frequency
+ * for switching from BAND0 to BAND1, and so on.
+ *
+ * On current Magnesium revisions, all filters on the TX filter bank are
+ * low pass filters (no high pass filters).
+ * Frequencies need to be chosen to allow as much of the full bandwidth
+ * through unattenuated (so don't go all the way up to the cutoff frequency
+ * of that filter, OK).
+ */
+constexpr double MAGNESIUM_TX_BAND1_MIN_FREQ = 723.17e6;
+constexpr double MAGNESIUM_TX_BAND2_MIN_FREQ = 1623.17e6;
+constexpr double MAGNESIUM_TX_BAND3_MIN_FREQ = 3323.17e6;
+} // namespace
-magnesium_radio_ctrl_impl::rx_band
-magnesium_radio_ctrl_impl::_map_freq_to_rx_band(const double freq) {
+magnesium_radio_ctrl_impl::rx_band magnesium_radio_ctrl_impl::_map_freq_to_rx_band(
+ const double freq)
+{
magnesium_radio_ctrl_impl::rx_band band;
if (fp_compare_epsilon<double>(freq) < MAGNESIUM_MIN_FREQ) {
@@ -130,8 +131,9 @@ magnesium_radio_ctrl_impl::_map_freq_to_rx_band(const double freq) {
return band;
}
-magnesium_radio_ctrl_impl::tx_band
-magnesium_radio_ctrl_impl::_map_freq_to_tx_band(const double freq) {
+magnesium_radio_ctrl_impl::tx_band magnesium_radio_ctrl_impl::_map_freq_to_tx_band(
+ const double freq)
+{
magnesium_radio_ctrl_impl::tx_band band;
if (fp_compare_epsilon<double>(freq) < MAGNESIUM_MIN_FREQ) {
@@ -152,4 +154,3 @@ magnesium_radio_ctrl_impl::_map_freq_to_tx_band(const double freq) {
return band;
}
-