diff options
author | Josh Blum <josh@joshknows.com> | 2011-01-31 16:29:12 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-01-31 16:29:12 -0800 |
commit | 625d5605dd157f9cf6f1d96e60a4d8d051817aef (patch) | |
tree | 4943b1d3fb498c8f36f574edeb1fb8ce7c66e323 /host/include | |
parent | e16445483e1505942b7b1ddcd9fc575532fd93ba (diff) | |
download | uhd-625d5605dd157f9cf6f1d96e60a4d8d051817aef.tar.gz uhd-625d5605dd157f9cf6f1d96e60a4d8d051817aef.tar.bz2 uhd-625d5605dd157f9cf6f1d96e60a4d8d051817aef.zip |
usrp: added set and get master clock rates to usrp API
implemented set and get rates in usrp1 (its all soft)
implemented set and get rates in usrp2 (only 100MHz)
Diffstat (limited to 'host/include')
-rw-r--r-- | host/include/uhd/usrp/mboard_props.hpp | 1 | ||||
-rw-r--r-- | host/include/uhd/usrp/multi_usrp.hpp | 20 |
2 files changed, 21 insertions, 0 deletions
diff --git a/host/include/uhd/usrp/mboard_props.hpp b/host/include/uhd/usrp/mboard_props.hpp index c82bfc21a..d04ad012c 100644 --- a/host/include/uhd/usrp/mboard_props.hpp +++ b/host/include/uhd/usrp/mboard_props.hpp @@ -31,6 +31,7 @@ namespace uhd{ namespace usrp{ enum mboard_prop_t{ MBOARD_PROP_NAME = 'n', //ro, std::string MBOARD_PROP_OTHERS = 'o', //ro, prop_names_t + MBOARD_PROP_CLOCK_RATE = 'c', //rw, double MBOARD_PROP_RX_DSP = 'd', //ro, wax::obj MBOARD_PROP_RX_DSP_NAMES = 'D', //ro, prop_names_t MBOARD_PROP_TX_DSP = 'u', //ro, wax::obj diff --git a/host/include/uhd/usrp/multi_usrp.hpp b/host/include/uhd/usrp/multi_usrp.hpp index 6e17c0ea8..c77b5d6d2 100644 --- a/host/include/uhd/usrp/multi_usrp.hpp +++ b/host/include/uhd/usrp/multi_usrp.hpp @@ -106,6 +106,26 @@ public: /******************************************************************* * Mboard methods ******************************************************************/ + + /*! + * Set the master clock rate. + * This controls the rate of the clock that feeds the FPGA DSP. + * On some devices, this re-tunes the clock to the specified rate. + * If the specified rate is not available, this method will throw. + * On other devices, this method notifies the software of the rate, + * but requires the the user has made the necessary hardware change. + * \param rate the new master clock rate in Hz + * \param mboard the motherboard index 0 to M-1 + */ + virtual void set_master_clock_rate(double rate, size_t mboard = ALL_MBOARDS) = 0; + + /*! + * Get the master clock rate. + * \param mboard the motherboard index 0 to M-1 + * \return the master clock rate in Hz. + */ + virtual double get_master_clock_rate(size_t mboard = 0) = 0; + /*! * Get a printable summary for this USRP configuration. * \return a printable string |