aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorTrung Tran <trung.tran@ettus.com>2018-08-03 09:10:48 -0700
committerMartin Braun <martin.braun@ettus.com>2018-09-14 22:15:56 -0700
commit29f896182a6b9d2b6831dfcc0b22711f05fde0c2 (patch)
treeebc0e0bbbf54d54cf6bc37b3067229073b2c1e4d /host
parente16e046d436e10bf1b3f268371e62c23bc5bfa98 (diff)
downloaduhd-29f896182a6b9d2b6831dfcc0b22711f05fde0c2.tar.gz
uhd-29f896182a6b9d2b6831dfcc0b22711f05fde0c2.tar.bz2
uhd-29f896182a6b9d2b6831dfcc0b22711f05fde0c2.zip
radio_ctrl: add disable time stamp
Diffstat (limited to 'host')
-rw-r--r--host/include/uhd/rfnoc/radio_ctrl.hpp3
-rw-r--r--host/lib/include/uhdlib/rfnoc/radio_ctrl_impl.hpp2
-rw-r--r--host/lib/rfnoc/radio_ctrl_impl.cpp8
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)
**********************************************************************/