diff options
author | Philip Balister <philip@opensdr.com> | 2011-02-01 05:42:36 -0800 |
---|---|---|
committer | Philip Balister <philip@opensdr.com> | 2011-02-01 05:42:36 -0800 |
commit | 781cddee31078e461202c2cf16f3de2f1f236a27 (patch) | |
tree | dcd8e1ff8e696dc00b91b425928a3367f05c9a25 /host/lib/usrp/usrp1/clock_ctrl.cpp | |
parent | cd45fb6be615a6f133e2c62a46f7c5eba76f72c1 (diff) | |
parent | 52e9c8f8027d0bbe1e6b0f57e30f985613e48be2 (diff) | |
download | uhd-781cddee31078e461202c2cf16f3de2f1f236a27.tar.gz uhd-781cddee31078e461202c2cf16f3de2f1f236a27.tar.bz2 uhd-781cddee31078e461202c2cf16f3de2f1f236a27.zip |
Merge branch 'usrp_e100_devel' of ettus.sourcerepo.com:ettus/uhdpriv into usrp_e100_devel
Conflicts:
host/lib/usrp/usrp_e100/clock_ctrl.cpp
Diffstat (limited to 'host/lib/usrp/usrp1/clock_ctrl.cpp')
-rw-r--r-- | host/lib/usrp/usrp1/clock_ctrl.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/host/lib/usrp/usrp1/clock_ctrl.cpp b/host/lib/usrp/usrp1/clock_ctrl.cpp index 68c5f5320..156f2b0c4 100644 --- a/host/lib/usrp/usrp1/clock_ctrl.cpp +++ b/host/lib/usrp/usrp1/clock_ctrl.cpp @@ -29,32 +29,33 @@ using namespace uhd; /*********************************************************************** * Constants **********************************************************************/ -static const double master_clock_rate = 64e6; +static const double default_master_clock_rate = 64e6; /*********************************************************************** * Clock Control Implementation **********************************************************************/ class usrp1_clock_ctrl_impl : public usrp1_clock_ctrl { public: - usrp1_clock_ctrl_impl(usrp1_iface::sptr iface) - { - _iface = iface; + usrp1_clock_ctrl_impl(usrp1_iface::sptr iface): _iface(iface){ + this->set_master_clock_freq(default_master_clock_rate); } - double get_master_clock_freq(void) - { - return master_clock_rate; + void set_master_clock_freq(double freq){ + _freq = freq; + } + + double get_master_clock_freq(void){ + return _freq; } private: usrp1_iface::sptr _iface; - + double _freq; }; /*********************************************************************** * Clock Control Make **********************************************************************/ -usrp1_clock_ctrl::sptr usrp1_clock_ctrl::make(usrp1_iface::sptr iface) -{ +usrp1_clock_ctrl::sptr usrp1_clock_ctrl::make(usrp1_iface::sptr iface){ return sptr(new usrp1_clock_ctrl_impl(iface)); } |