aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/multi_usrp.cpp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2018-08-09 17:16:01 -0500
committerBrent Stapleton <bstapleton@g.hmc.edu>2018-08-16 11:40:48 -0700
commitd0e8f4effa356d2c8018241e78a520c50ab23f9a (patch)
tree273908b3f73174035cdc7fa7d0ae7e3a90e7bd6f /host/lib/usrp/multi_usrp.cpp
parent029e29e24b071e0f316ca74c6d1ff614acc23e19 (diff)
downloaduhd-d0e8f4effa356d2c8018241e78a520c50ab23f9a.tar.gz
uhd-d0e8f4effa356d2c8018241e78a520c50ab23f9a.tar.bz2
uhd-d0e8f4effa356d2c8018241e78a520c50ab23f9a.zip
multi_usrp: Add get_user_settings_iface() API call
For USRPs that support user settings (e.g., B2xx, N230), this will return an object that will allow peeking and poking user-defined settings registers. Mock code example: auto usrp = multi_usrp::make(...); auto user_settings_iface = usrp->get_user_settings_iface(); user_settings_iface->poke32(0, 23);
Diffstat (limited to 'host/lib/usrp/multi_usrp.cpp')
-rw-r--r--host/lib/usrp/multi_usrp.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp
index 1985da254..687f1c06d 100644
--- a/host/lib/usrp/multi_usrp.cpp
+++ b/host/lib/usrp/multi_usrp.cpp
@@ -820,6 +820,18 @@ public:
}
}
+ wb_iface::sptr get_user_settings_iface(const size_t chan)
+ {
+ const auto user_settings_path =
+ rx_rf_fe_root(chan) / "user_settings" / "iface";
+ if (_tree->exists(user_settings_path)) {
+ return _tree->access<wb_iface::sptr>(user_settings_path).get();
+ }
+ UHD_LOG_WARNING("MULTI_USRP",
+ "Attempting to read back non-existant user settings iface!");
+ return nullptr;
+ }
+
/*******************************************************************
* RX methods
******************************************************************/