aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerek Kozel <derek.kozel@ettus.com>2017-04-07 19:38:44 -0700
committerMartin Braun <martin.braun@ettus.com>2017-04-13 15:30:13 -0700
commitd1596dc40b1f0983512ab48372bdf25dd918710e (patch)
tree9dd689912e36d486ff1140950f6d3267f86c7bf8
parentce14b640546985ac65964e071e869c1504d3e025 (diff)
downloaduhd-d1596dc40b1f0983512ab48372bdf25dd918710e.tar.gz
uhd-d1596dc40b1f0983512ab48372bdf25dd918710e.tar.bz2
uhd-d1596dc40b1f0983512ab48372bdf25dd918710e.zip
rfnoc: Add set_command_time hook to radio block
-rw-r--r--host/include/uhd/rfnoc/block_ctrl_base.hpp3
-rw-r--r--host/lib/rfnoc/block_ctrl_base.cpp5
-rw-r--r--host/lib/usrp/x300/x300_radio_ctrl_impl.cpp4
-rw-r--r--host/lib/usrp/x300/x300_radio_ctrl_impl.hpp1
4 files changed, 13 insertions, 0 deletions
diff --git a/host/include/uhd/rfnoc/block_ctrl_base.hpp b/host/include/uhd/rfnoc/block_ctrl_base.hpp
index f770cf129..e9dd9c233 100644
--- a/host/include/uhd/rfnoc/block_ctrl_base.hpp
+++ b/host/include/uhd/rfnoc/block_ctrl_base.hpp
@@ -381,6 +381,9 @@ protected:
// than reset register SR_CLEAR_TX_FC.
virtual void _clear(const size_t port = 0);
+ //! Override this function if your block needs to specially handle
+ // setting the command time
+ virtual void _set_command_time(const time_spec_t &time_spec, const size_t port = ANY_PORT);
/***********************************************************************
* Protected members
**********************************************************************/
diff --git a/host/lib/rfnoc/block_ctrl_base.cpp b/host/lib/rfnoc/block_ctrl_base.cpp
index 24dad6b47..a6eecc20b 100644
--- a/host/lib/rfnoc/block_ctrl_base.cpp
+++ b/host/lib/rfnoc/block_ctrl_base.cpp
@@ -356,6 +356,7 @@ void block_ctrl_base::set_command_time(
}
iface_sptr->set_time(time_spec);
+ _set_command_time(time_spec, port);
}
time_spec_t block_ctrl_base::get_command_time(
@@ -583,4 +584,8 @@ void block_ctrl_base::_clear(const size_t port)
sr_write(SR_CLEAR_RX_FC, 0x00C1EA12, port); // 'CLEAR', but we can write anything, really
}
+void block_ctrl_base::_set_command_time(const time_spec_t & /*time_spec*/, const size_t /*port*/)
+{
+ UHD_RFNOC_BLOCK_TRACE() << "block_ctrl_base::_set_command_time() ";
+}
// vim: sw=4 et:
diff --git a/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp b/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp
index 0e11cb42c..80865eaf0 100644
--- a/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp
+++ b/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp
@@ -907,6 +907,10 @@ void x300_radio_ctrl_impl::_set_db_eeprom(i2c_iface::sptr i2c, const size_t addr
_db_eeproms[addr] = db_eeprom;
}
+void x300_radio_ctrl_impl::_set_command_time(const time_spec_t &spec, const size_t port)
+{
+ set_fe_cmd_time(spec, port);
+}
/****************************************************************************
* Helpers
***************************************************************************/
diff --git a/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp b/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp
index 6e17778bd..417c88f9e 100644
--- a/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp
+++ b/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp
@@ -161,6 +161,7 @@ private:
void set_rx_fe_corrections(const uhd::fs_path &db_path, const uhd::fs_path &rx_fe_corr_path, const double lo_freq);
void set_tx_fe_corrections(const uhd::fs_path &db_path, const uhd::fs_path &tx_fe_corr_path, const double lo_freq);
+ void _set_command_time(const uhd::time_spec_t &spec, const size_t port);
void set_fe_cmd_time(const time_spec_t &time, const size_t chan);
private: // members