aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/usrp/x300/x300_radio_ctrl_impl.cpp')
-rw-r--r--host/lib/usrp/x300/x300_radio_ctrl_impl.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp b/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp
index b6b6e1824..88bbcf342 100644
--- a/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp
+++ b/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp
@@ -93,6 +93,12 @@ UHD_RFNOC_RADIO_BLOCK_CONSTRUCTOR(x300_radio_ctrl)
_fp_gpio->set_gpio_attr(attr.first, val);
});
break;
+ case usrp::gpio_atr::GPIO_READBACK:
+ _tree->create<uint32_t>(fs_path("gpio") / "FP0" / "READBACK")
+ .set_publisher([this](){
+ return _fp_gpio->read_gpio();
+ });
+ break;
default:
_tree->create<uint32_t>(fs_path("gpio") / "FP0" / attr.second)
.set(0)
@@ -102,10 +108,6 @@ UHD_RFNOC_RADIO_BLOCK_CONSTRUCTOR(x300_radio_ctrl)
}
}
- _tree->create<uint32_t>(fs_path("gpio") / "FP0" / "READBACK")
- .set_publisher([this](){
- return _fp_gpio->read_gpio();
- });
}
////////////////////////////////////////////////////////////////
@@ -169,7 +171,6 @@ x300_radio_ctrl_impl::~x300_radio_ctrl_impl()
for(const gpio_atr::gpio_attr_map_t::value_type attr: gpio_atr::gpio_attr_map) {
_tree->remove(fs_path("gpio") / "FP0" / attr.second);
}
- _tree->remove(fs_path("gpio") / "FP0" / "READBACK");
}
// Reset peripherals