summaryrefslogtreecommitdiff
path: root/gr-usrp2
diff options
context:
space:
mode:
authorjcorgan2008-12-15 04:53:29 +0000
committerjcorgan2008-12-15 04:53:29 +0000
commit0ebedf4c4111e2842ad4f90eb80f812479e6ec18 (patch)
tree3d3fb4d31d06031eea892b4cf789d49f9c0f5557 /gr-usrp2
parent2a59bb988662ecd430ce885a53aa3823ab546230 (diff)
downloadgnuradio-0ebedf4c4111e2842ad4f90eb80f812479e6ec18.tar.gz
gnuradio-0ebedf4c4111e2842ad4f90eb80f812479e6ec18.tar.bz2
gnuradio-0ebedf4c4111e2842ad4f90eb80f812479e6ec18.zip
Add sync_to_pps to gr-usrp2
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10121 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gr-usrp2')
-rw-r--r--gr-usrp2/src/usrp2.i1
-rw-r--r--gr-usrp2/src/usrp2_base.cc6
-rw-r--r--gr-usrp2/src/usrp2_base.h5
3 files changed, 12 insertions, 0 deletions
diff --git a/gr-usrp2/src/usrp2.i b/gr-usrp2/src/usrp2.i
index 7c75287cb..df07ee8f4 100644
--- a/gr-usrp2/src/usrp2.i
+++ b/gr-usrp2/src/usrp2.i
@@ -48,6 +48,7 @@ public:
std::string mac_addr() const;
%rename(_real_fpga_master_clock_freq) fpga_master_clock_freq;
bool fpga_master_clock_freq(long *freq);
+ bool sync_to_pps();
};
// ----------------------------------------------------------------
diff --git a/gr-usrp2/src/usrp2_base.cc b/gr-usrp2/src/usrp2_base.cc
index 0bd973041..8f80a0119 100644
--- a/gr-usrp2/src/usrp2_base.cc
+++ b/gr-usrp2/src/usrp2_base.cc
@@ -62,6 +62,12 @@ usrp2_base::fpga_master_clock_freq(long *freq) const
}
bool
+usrp2_base::sync_to_pps()
+{
+ return d_u2->sync_to_pps();
+}
+
+bool
usrp2_base::start()
{
// Default implementation is NOP
diff --git a/gr-usrp2/src/usrp2_base.h b/gr-usrp2/src/usrp2_base.h
index ae08283b7..df0c862f8 100644
--- a/gr-usrp2/src/usrp2_base.h
+++ b/gr-usrp2/src/usrp2_base.h
@@ -59,6 +59,11 @@ public:
bool fpga_master_clock_freq(long *freq) const;
/*!
+ * \brief Set master time to 0 at next PPS rising edge
+ */
+ bool sync_to_pps();
+
+ /*!
* \brief Called by scheduler when starting flowgraph
*/
virtual bool start();