diff options
author | jcorgan | 2008-12-15 04:53:29 +0000 |
---|---|---|
committer | jcorgan | 2008-12-15 04:53:29 +0000 |
commit | 0ebedf4c4111e2842ad4f90eb80f812479e6ec18 (patch) | |
tree | 3d3fb4d31d06031eea892b4cf789d49f9c0f5557 /gr-usrp2/src | |
parent | 2a59bb988662ecd430ce885a53aa3823ab546230 (diff) | |
download | gnuradio-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/src')
-rw-r--r-- | gr-usrp2/src/usrp2.i | 1 | ||||
-rw-r--r-- | gr-usrp2/src/usrp2_base.cc | 6 | ||||
-rw-r--r-- | gr-usrp2/src/usrp2_base.h | 5 |
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(); |