diff options
author | Josh Blum <josh@joshknows.com> | 2011-02-03 18:51:42 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-02-03 18:51:42 -0800 |
commit | d6c52af6a8ac2e2a85942116768cf69971aac48a (patch) | |
tree | 58f90b7da55eda0317ac1343ad7878c9adfdc631 /host/lib/usrp/usrp1/clock_ctrl.cpp | |
parent | 5d459d1cb09cdce0c1fd4d7e7d0259310921b94f (diff) | |
parent | 43b19815fec253dc7e5538329f9fe1363f007b8a (diff) | |
download | uhd-d6c52af6a8ac2e2a85942116768cf69971aac48a.tar.gz uhd-d6c52af6a8ac2e2a85942116768cf69971aac48a.tar.bz2 uhd-d6c52af6a8ac2e2a85942116768cf69971aac48a.zip |
Merge branch 'convert_fc64'
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)); } |