aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2020-07-02 16:22:57 +0200
committerAaron Rossetto <aaron.rossetto@ni.com>2020-07-16 15:17:26 -0500
commite4291f1ddcf9f23e4449201fc2677c0379b13ca6 (patch)
tree65d4fab6351e70cd0a201f64b79159e977120412 /host/lib/usrp
parent35038421e1b3edd577037cd1dddc4e77df76a3ab (diff)
downloaduhd-e4291f1ddcf9f23e4449201fc2677c0379b13ca6.tar.gz
uhd-e4291f1ddcf9f23e4449201fc2677c0379b13ca6.tar.bz2
uhd-e4291f1ddcf9f23e4449201fc2677c0379b13ca6.zip
multi_usrp: Add get_radio_control() API call
This is an advanced API call that allows direct underlying access to the radio_control object for RFNoC devices.
Diffstat (limited to 'host/lib/usrp')
-rw-r--r--host/lib/usrp/multi_usrp.cpp6
-rw-r--r--host/lib/usrp/multi_usrp_python.hpp1
-rw-r--r--host/lib/usrp/multi_usrp_rfnoc.cpp5
3 files changed, 12 insertions, 0 deletions
diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp
index 04d054b60..b9a60a794 100644
--- a/host/lib/usrp/multi_usrp.cpp
+++ b/host/lib/usrp/multi_usrp.cpp
@@ -948,6 +948,12 @@ public:
return nullptr;
}
+ uhd::rfnoc::radio_control& get_radio_control(const size_t)
+ {
+ throw uhd::not_implemented_error(
+ "get_radio_control() not supported on this device!");
+ }
+
/*******************************************************************
* RX methods
******************************************************************/
diff --git a/host/lib/usrp/multi_usrp_python.hpp b/host/lib/usrp/multi_usrp_python.hpp
index cf2db7690..6c2fd2ccf 100644
--- a/host/lib/usrp/multi_usrp_python.hpp
+++ b/host/lib/usrp/multi_usrp_python.hpp
@@ -85,6 +85,7 @@ void export_multi_usrp(py::module& m)
.def("get_mboard_sensor" , &multi_usrp::get_mboard_sensor, py::arg("name"), py::arg("mboard") = 0)
.def("get_mboard_sensor_names" , &multi_usrp::get_mboard_sensor_names, py::arg("mboard") = 0)
.def("set_user_register" , &multi_usrp::set_user_register, py::arg("addr"), py::arg("data"), py::arg("mboard") = ALL_MBOARDS)
+ .def("get_radio_control" , &multi_usrp::get_radio_control, py::arg("chan") = 0)
// RX methods
.def("set_rx_subdev_spec" , &multi_usrp::set_rx_subdev_spec, py::arg("spec"), py::arg("mboard") = ALL_MBOARDS)
diff --git a/host/lib/usrp/multi_usrp_rfnoc.cpp b/host/lib/usrp/multi_usrp_rfnoc.cpp
index e35121994..4554f4e57 100644
--- a/host/lib/usrp/multi_usrp_rfnoc.cpp
+++ b/host/lib/usrp/multi_usrp_rfnoc.cpp
@@ -933,6 +933,11 @@ public:
return nullptr;
}
+ uhd::rfnoc::radio_control& get_radio_control(const size_t chan = 0)
+ {
+ return *_get_rx_chan(chan).radio;
+ }
+
/*******************************************************************
* RX methods
******************************************************************/