aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2019-09-11 17:41:21 -0700
committerMartin Braun <martin.braun@ettus.com>2019-11-26 11:49:46 -0800
commit67dbaa41f21fb8610444fd8a61b14af78a4ce48c (patch)
tree060eb3cc2cdabdb63a5b394f5239ec761a2816e6
parent96dd8f437ec88f3c60e7273d0880347239a91426 (diff)
downloaduhd-67dbaa41f21fb8610444fd8a61b14af78a4ce48c.tar.gz
uhd-67dbaa41f21fb8610444fd8a61b14af78a4ce48c.tar.bz2
uhd-67dbaa41f21fb8610444fd8a61b14af78a4ce48c.zip
rfnoc: radio: Add API call to disable timestamps
By calling radio_control::enable_rx_timestamps(false, chan), the radio will not add timestamps to outgoing packets.
-rw-r--r--host/include/uhd/rfnoc/radio_control.hpp4
-rw-r--r--host/lib/include/uhdlib/rfnoc/radio_control_impl.hpp5
-rw-r--r--host/lib/rfnoc/radio_control_impl.cpp5
3 files changed, 13 insertions, 1 deletions
diff --git a/host/include/uhd/rfnoc/radio_control.hpp b/host/include/uhd/rfnoc/radio_control.hpp
index eb948cb3c..4b1bd3d82 100644
--- a/host/include/uhd/rfnoc/radio_control.hpp
+++ b/host/include/uhd/rfnoc/radio_control.hpp
@@ -647,6 +647,10 @@ public:
virtual void issue_stream_cmd(
const uhd::stream_cmd_t& stream_cmd, const size_t port) = 0;
+ /*! Enable or disable the setting of timestamps on Rx.
+ */
+ virtual void enable_rx_timestamps(const bool enable, const size_t chan) = 0;
+
/**************************************************************************
* Radio Identification API Calls
*************************************************************************/
diff --git a/host/lib/include/uhdlib/rfnoc/radio_control_impl.hpp b/host/lib/include/uhdlib/rfnoc/radio_control_impl.hpp
index b3ef2db0b..72ed39824 100644
--- a/host/lib/include/uhdlib/rfnoc/radio_control_impl.hpp
+++ b/host/lib/include/uhdlib/rfnoc/radio_control_impl.hpp
@@ -39,6 +39,8 @@ public:
*************************************************************************/
void issue_stream_cmd(const uhd::stream_cmd_t& stream_cmd, const size_t port);
+ void enable_rx_timestamps(const bool enable, const size_t chan);
+
/**************************************************************************
* Rate-Related API Calls
*************************************************************************/
@@ -211,7 +213,8 @@ public:
static const uint32_t REG_RX_ERR_REM_PORT = 0x30; // Remote port ID for error reporting
static const uint32_t REG_RX_ERR_REM_EPID = 0x34; // Remote EPID (endpoint ID) for error reporting
static const uint32_t REG_RX_ERR_ADDR = 0x38; // Offset to which to write error code (ADDR+0) and time (ADDR+8)
- static const uint32_t REG_RX_DATA = 0x3C;
+ static const uint32_t REG_RX_DATA = 0x3C;
+ static const uint32_t REG_RX_HAS_TIME = 0x70; // Set to one if radio output packets should have timestamps
// TX Control Registers
static const uint32_t REG_TX_IDLE_VALUE = 0x40; // Value to output when transmitter is idle
diff --git a/host/lib/rfnoc/radio_control_impl.cpp b/host/lib/rfnoc/radio_control_impl.cpp
index 758f9be6c..4d03708bf 100644
--- a/host/lib/rfnoc/radio_control_impl.cpp
+++ b/host/lib/rfnoc/radio_control_impl.cpp
@@ -832,6 +832,11 @@ void radio_control_impl::issue_stream_cmd(
regs().poke32(get_addr(regmap::REG_RX_CMD, chan), cmd_word);
}
+void radio_control_impl::enable_rx_timestamps(const bool enable, const size_t chan)
+{
+ regs().poke32(get_addr(regmap::REG_RX_HAS_TIME, chan), enable ? 0x1 : 0x0);
+}
+
/******************************************************************************
* Private methods
*****************************************************************************/