aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/x300/x300_radio_control.cpp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2020-03-02 15:25:13 -0800
committeratrnati <54334261+atrnati@users.noreply.github.com>2020-03-03 08:51:32 -0600
commit876d4150aa3da531ddd687b48afada6e43f79146 (patch)
treefd72a71419f4cd800d4e500cfcaded4dfc8dc367 /host/lib/usrp/x300/x300_radio_control.cpp
parent1393553d623bdf4ba40d5435c9719b6ce990d9ac (diff)
downloaduhd-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/x300/x300_radio_control.cpp')
-rw-r--r--host/lib/usrp/x300/x300_radio_control.cpp23
1 files changed, 8 insertions, 15 deletions
diff --git a/host/lib/usrp/x300/x300_radio_control.cpp b/host/lib/usrp/x300/x300_radio_control.cpp
index 48b484467..1bd88164a 100644
--- a/host/lib/usrp/x300/x300_radio_control.cpp
+++ b/host/lib/usrp/x300/x300_radio_control.cpp
@@ -28,11 +28,11 @@
#include <uhdlib/usrp/cores/spi_core_3000.hpp>
#include <uhdlib/usrp/cores/tx_frontend_core_200.hpp>
#include <boost/algorithm/string.hpp>
-#include <memory>
#include <algorithm>
#include <chrono>
#include <functional>
#include <iostream>
+#include <memory>
#include <thread>
using namespace uhd;
@@ -869,26 +869,19 @@ public:
constexpr uint16_t mask = 0xFFFF;
if (attr == "CTRL") {
_db_iface->set_pin_ctrl(unit, value, mask);
- }
- else if (attr == "DDR") {
+ } else if (attr == "DDR") {
_db_iface->set_gpio_ddr(unit, value, mask);
- }
- else if (attr == "OUT") {
+ } else if (attr == "OUT") {
_db_iface->set_gpio_out(unit, value, mask);
- }
- else if (attr == "ATR_0X") {
+ } else if (attr == "ATR_0X") {
_db_iface->set_atr_reg(unit, gpio_atr::ATR_REG_IDLE, value, mask);
- }
- else if (attr == "ATR_RX") {
+ } else if (attr == "ATR_RX") {
_db_iface->set_atr_reg(unit, gpio_atr::ATR_REG_RX_ONLY, value, mask);
- }
- else if (attr == "ATR_TX") {
+ } else if (attr == "ATR_TX") {
_db_iface->set_atr_reg(unit, gpio_atr::ATR_REG_TX_ONLY, value, mask);
- }
- else if (attr == "ATR_XX") {
+ } else if (attr == "ATR_XX") {
_db_iface->set_atr_reg(unit, gpio_atr::ATR_REG_FULL_DUPLEX, value, mask);
- }
- else {
+ } else {
RFNOC_LOG_ERROR("Invalid GPIO attribute name: " << attr);
throw uhd::key_error(std::string("Invalid GPIO attribute name: ") + attr);
}