aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/rfnoc
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/rfnoc')
-rw-r--r--host/lib/rfnoc/ddc_block_control.cpp5
-rw-r--r--host/lib/rfnoc/duc_block_control.cpp5
2 files changed, 10 insertions, 0 deletions
diff --git a/host/lib/rfnoc/ddc_block_control.cpp b/host/lib/rfnoc/ddc_block_control.cpp
index 0522991ba..abf8d1f7b 100644
--- a/host/lib/rfnoc/ddc_block_control.cpp
+++ b/host/lib/rfnoc/ddc_block_control.cpp
@@ -136,6 +136,11 @@ public:
return _samp_rate_in.at(chan).is_valid() ? _samp_rate_in.at(chan).get() : 1.0;
}
+ void set_input_rate(const double rate, const size_t chan)
+ {
+ set_property<double>("samp_rate", rate, {res_source_info::INPUT_EDGE, chan});
+ }
+
double get_output_rate(const size_t chan) const
{
return _samp_rate_out.at(chan).is_valid() ? _samp_rate_out.at(chan).get() : 1.0;
diff --git a/host/lib/rfnoc/duc_block_control.cpp b/host/lib/rfnoc/duc_block_control.cpp
index 6b052e17a..5888e300e 100644
--- a/host/lib/rfnoc/duc_block_control.cpp
+++ b/host/lib/rfnoc/duc_block_control.cpp
@@ -138,6 +138,11 @@ public:
return _samp_rate_out.at(chan).is_valid() ? _samp_rate_out.at(chan).get() : 1.0;
}
+ void set_output_rate(const double rate, const size_t chan)
+ {
+ set_property<double>("samp_rate", rate, {res_source_info::OUTPUT_EDGE, chan});
+ }
+
uhd::meta_range_t get_input_rates(const size_t chan) const
{
uhd::meta_range_t result;