aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/include
diff options
context:
space:
mode:
authormichael-west <michael.west@ettus.com>2021-11-04 13:53:20 -0700
committerAaron Rossetto <aaron.rossetto@ni.com>2021-11-17 14:04:34 -0800
commit9b78da222fb5e51c1ad9ccd6887d1cf85c4c7926 (patch)
tree2014c004d639a86d03504f89630c78d8333d2973 /host/lib/include
parent43ab4c8b43d8407fc9f345ca4b13634f03ad4a43 (diff)
downloaduhd-9b78da222fb5e51c1ad9ccd6887d1cf85c4c7926.tar.gz
uhd-9b78da222fb5e51c1ad9ccd6887d1cf85c4c7926.tar.bz2
uhd-9b78da222fb5e51c1ad9ccd6887d1cf85c4c7926.zip
host: Add ability to get time from Radio block
Add API calls to Radio control to get ticks and time. Signed-off-by: michael-west <michael.west@ettus.com>
Diffstat (limited to 'host/lib/include')
-rw-r--r--host/lib/include/uhdlib/rfnoc/radio_control_impl.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/host/lib/include/uhdlib/rfnoc/radio_control_impl.hpp b/host/lib/include/uhdlib/rfnoc/radio_control_impl.hpp
index 0ff0e9b12..b60b0f2a2 100644
--- a/host/lib/include/uhdlib/rfnoc/radio_control_impl.hpp
+++ b/host/lib/include/uhdlib/rfnoc/radio_control_impl.hpp
@@ -59,6 +59,12 @@ public:
size_t get_spc() const override;
/**************************************************************************
+ * Time-Related API Calls
+ *************************************************************************/
+ uint64_t get_ticks_now() override;
+ uhd::time_spec_t get_time_now() override;
+
+ /**************************************************************************
* RF-specific API calls
*************************************************************************/
// Setters
@@ -209,6 +215,10 @@ public:
{
static const uint32_t REG_COMPAT_NUM =
0x00; // Compatibility number register offset
+ static const uint32_t REG_TIME_LO =
+ 0x04; // Time lower bits
+ static const uint32_t REG_TIME_HI =
+ 0x08; // Time upper bits
static const uint32_t REG_RADIO_WIDTH =
0x1000 + 0x04; // Upper 16 bits is sample width, lower 16 bits is NSPC