diff options
author | Josh Blum <josh@joshknows.com> | 2011-12-12 12:49:40 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-12-12 12:49:40 -0800 |
commit | 84ebf02b2bdacffccc9e5fa3096477d86b9ac152 (patch) | |
tree | b40fc4c98c2d86c577ee51784741d45f44b73836 | |
parent | b433c25b1934fd2de60b6aa394eb741daa997649 (diff) | |
download | uhd-84ebf02b2bdacffccc9e5fa3096477d86b9ac152.tar.gz uhd-84ebf02b2bdacffccc9e5fa3096477d86b9ac152.tar.bz2 uhd-84ebf02b2bdacffccc9e5fa3096477d86b9ac152.zip |
usrp: added mboard param to set time next pps
-rw-r--r-- | host/include/uhd/usrp/multi_usrp.hpp | 3 | ||||
-rw-r--r-- | host/lib/usrp/multi_usrp.cpp | 10 |
2 files changed, 9 insertions, 4 deletions
diff --git a/host/include/uhd/usrp/multi_usrp.hpp b/host/include/uhd/usrp/multi_usrp.hpp index 5ea00565a..49354f1af 100644 --- a/host/include/uhd/usrp/multi_usrp.hpp +++ b/host/include/uhd/usrp/multi_usrp.hpp @@ -199,8 +199,9 @@ public: * the seconds in the time spec should be current seconds + 1. * * \param time_spec the time to latch into the usrp device + * \param mboard the motherboard index 0 to M-1 */ - virtual void set_time_next_pps(const time_spec_t &time_spec) = 0; + virtual void set_time_next_pps(const time_spec_t &time_spec, size_t mboard = ALL_MBOARDS) = 0; /*! * Synchronize the times across all motherboards in this configuration. diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp index 6fd60fb6f..6cd9f95bb 100644 --- a/host/lib/usrp/multi_usrp.cpp +++ b/host/lib/usrp/multi_usrp.cpp @@ -304,9 +304,13 @@ public: } } - void set_time_next_pps(const time_spec_t &time_spec){ + void set_time_next_pps(const time_spec_t &time_spec, size_t mboard){ + if (mboard != ALL_MBOARDS){ + _tree->access<time_spec_t>(mb_root(mboard) / "time/pps").set(time_spec); + return; + } for (size_t m = 0; m < get_num_mboards(); m++){ - _tree->access<time_spec_t>(mb_root(m) / "time/pps").set(time_spec); + set_time_next_pps(time_spec, m); } } @@ -326,7 +330,7 @@ public: } UHD_MSG(status) << " 2) set times next pps (synchronously)" << std::endl; - set_time_next_pps(time_spec); + set_time_next_pps(time_spec, ALL_MBOARDS); boost::this_thread::sleep(boost::posix_time::seconds(1)); //verify that the time registers are read to be within a few RTT |