From aff6165dc938fe072d4872b65be146e6d3f75bec Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Mon, 20 Mar 2017 18:11:20 -0700 Subject: rfnoc: Add API calls for time/clock control --- host/include/uhd/rfnoc/radio_ctrl.hpp | 47 +++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) (limited to 'host/include') diff --git a/host/include/uhd/rfnoc/radio_ctrl.hpp b/host/include/uhd/rfnoc/radio_ctrl.hpp index fe9636b32..67ea4c069 100644 --- a/host/include/uhd/rfnoc/radio_ctrl.hpp +++ b/host/include/uhd/rfnoc/radio_ctrl.hpp @@ -200,6 +200,53 @@ public: */ virtual time_spec_t get_time_last_pps() = 0; + /*! + * Set the time source for this radio. + * + * May affect other radio blocks. + * + * \param source A string representing the time source + * \throws uhd::value_error if the value can't be applied + */ + virtual void set_time_source(const std::string &source) = 0; + + /*! + * Get the currently set time source. + * \param mboard which motherboard to get the config + * \return the string representing the time source + */ + virtual std::string get_time_source() = 0; + + /*! + * Get a list of possible time sources. + * + * \return a vector of strings for possible settings + */ + virtual std::vector get_time_sources() = 0; + + /*! + * Set the clock source for the usrp device (for reference clock). + * + * Typical options for source: internal, external. + * + * \param source a string representing the clock source + */ + virtual void set_clock_source(const std::string &source) = 0; + + /*! + * Get the currently set clock source. + * + * \return the string representing the clock source + */ + virtual std::string get_clock_source() = 0; + + /*! + * Get a list of possible clock sources. + * + * \return a vector of strings for possible settings + */ + virtual std::vector get_clock_sources() = 0; + /*! Given a frontend name, return the channel mapping. * * E.g.: For a TwinRX board, there's two frontends, '0' and '1', which -- cgit v1.2.3