diff options
author | Josh Blum <josh@joshknows.com> | 2011-01-31 16:29:12 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-01-31 16:29:12 -0800 |
commit | 625d5605dd157f9cf6f1d96e60a4d8d051817aef (patch) | |
tree | 4943b1d3fb498c8f36f574edeb1fb8ce7c66e323 /host/lib/usrp/multi_usrp.cpp | |
parent | e16445483e1505942b7b1ddcd9fc575532fd93ba (diff) | |
download | uhd-625d5605dd157f9cf6f1d96e60a4d8d051817aef.tar.gz uhd-625d5605dd157f9cf6f1d96e60a4d8d051817aef.tar.bz2 uhd-625d5605dd157f9cf6f1d96e60a4d8d051817aef.zip |
usrp: added set and get master clock rates to usrp API
implemented set and get rates in usrp1 (its all soft)
implemented set and get rates in usrp2 (only 100MHz)
Diffstat (limited to 'host/lib/usrp/multi_usrp.cpp')
-rw-r--r-- | host/lib/usrp/multi_usrp.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp index 17458496b..817d7b085 100644 --- a/host/lib/usrp/multi_usrp.cpp +++ b/host/lib/usrp/multi_usrp.cpp @@ -53,6 +53,20 @@ public: /******************************************************************* * Mboard methods ******************************************************************/ + void set_master_clock_rate(double rate, size_t mboard){ + if (mboard != ALL_MBOARDS){ + _mboard(mboard)[MBOARD_PROP_CLOCK_RATE] = rate; + return; + } + for (size_t m = 0; m < get_num_mboards(); m++){ + set_master_clock_rate(rate, m); + } + } + + double get_master_clock_rate(size_t mboard){ + return _mboard(mboard)[MBOARD_PROP_CLOCK_RATE].as<double>(); + } + std::string get_pp_string(void){ std::string buff = str(boost::format( "%s USRP:\n" |