diff options
-rw-r--r-- | host/include/uhd/rfnoc/radio_ctrl.hpp | 3 | ||||
-rw-r--r-- | host/lib/include/uhdlib/rfnoc/radio_ctrl_impl.hpp | 2 | ||||
-rw-r--r-- | host/lib/rfnoc/radio_ctrl_impl.cpp | 8 |
3 files changed, 13 insertions, 0 deletions
diff --git a/host/include/uhd/rfnoc/radio_ctrl.hpp b/host/include/uhd/rfnoc/radio_ctrl.hpp index 9f1496dfc..28ba9264b 100644 --- a/host/include/uhd/rfnoc/radio_ctrl.hpp +++ b/host/include/uhd/rfnoc/radio_ctrl.hpp @@ -531,6 +531,9 @@ public: */ virtual std::string get_dboard_fe_from_chan(const size_t chan, const uhd::direction_t dir) = 0; + /*! Enable or disable the setting of timestamps on Rx. + */ + virtual void enable_rx_timestamps(const bool enable, const size_t chan) = 0; }; /* class radio_ctrl */ }} /* namespace uhd::rfnoc */ diff --git a/host/lib/include/uhdlib/rfnoc/radio_ctrl_impl.hpp b/host/lib/include/uhdlib/rfnoc/radio_ctrl_impl.hpp index a86edf67e..fcfd55450 100644 --- a/host/lib/include/uhdlib/rfnoc/radio_ctrl_impl.hpp +++ b/host/lib/include/uhdlib/rfnoc/radio_ctrl_impl.hpp @@ -110,6 +110,7 @@ public: const uint32_t mask ); virtual uint32_t get_gpio_attr(const std::string &bank, const std::string &attr); + void enable_rx_timestamps(const bool, const size_t); /*********************************************************************** * Block control API calls @@ -152,6 +153,7 @@ protected: // TODO see what's protected and what's private static const uint32_t RX_CTRL_HALT = 155; static const uint32_t RX_CTRL_MAXLEN = 156; static const uint32_t RX_CTRL_CLEAR_CMDS = 157; + static const uint32_t RX_CTRL_OUTPUT_FORMAT= 158; static const uint32_t MISC_OUTS = 160; static const uint32_t DACSYNC = 161; static const uint32_t SPI = 168; diff --git a/host/lib/rfnoc/radio_ctrl_impl.cpp b/host/lib/rfnoc/radio_ctrl_impl.cpp index 2479d889a..66040f67c 100644 --- a/host/lib/rfnoc/radio_ctrl_impl.cpp +++ b/host/lib/rfnoc/radio_ctrl_impl.cpp @@ -343,6 +343,14 @@ double radio_ctrl_impl::get_tx_lo_freq( return get_tx_frequency(chan); } +void radio_ctrl_impl::enable_rx_timestamps(const bool enable, const size_t chan) +{ + const uint32_t output_format = 0 + | (enable ? 0x01 : 0x00) + ; + sr_write(regs::RX_CTRL_OUTPUT_FORMAT, output_format, chan); +} + /*********************************************************************** * RX Streamer-related methods (from source_block_ctrl_base) **********************************************************************/ |