aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/multi_usrp.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2012-01-28 17:21:40 -0800
committerJosh Blum <josh@joshknows.com>2012-01-31 14:56:31 -0800
commit781cafa8717f00b883a4543b4a9150060691eee3 (patch)
treed99dea19b44448e8d78fa9ae0f84df1049241b33 /host/lib/usrp/multi_usrp.cpp
parentaa95e53a91fa52b61b6796fcfc811251b20dcb73 (diff)
downloaduhd-781cafa8717f00b883a4543b4a9150060691eee3.tar.gz
uhd-781cafa8717f00b883a4543b4a9150060691eee3.tar.bz2
uhd-781cafa8717f00b883a4543b4a9150060691eee3.zip
gen2: added user setting regs api and user core
Diffstat (limited to 'host/lib/usrp/multi_usrp.cpp')
-rw-r--r--host/lib/usrp/multi_usrp.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp
index 6cd9f95bb..d9be19b83 100644
--- a/host/lib/usrp/multi_usrp.cpp
+++ b/host/lib/usrp/multi_usrp.cpp
@@ -445,6 +445,17 @@ public:
return _tree->list(mb_root(mboard) / "sensors");
}
+ void set_user_register(const boost::uint8_t addr, const boost::uint32_t data, size_t mboard){
+ if (mboard != ALL_MBOARDS){
+ typedef std::pair<boost::uint8_t, boost::uint32_t> user_reg_t;
+ _tree->access<user_reg_t>(mb_root(mboard) / "user/reg").set(user_reg_t(addr, data));
+ return;
+ }
+ for (size_t m = 0; m < get_num_mboards(); m++){
+ set_user_register(addr, data, m);
+ }
+ }
+
/*******************************************************************
* RX methods
******************************************************************/