summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-05-14 13:02:04 -0700
committerJosh Blum <josh@joshknows.com>2010-05-14 13:02:04 -0700
commit695dd535d5a7419f467598a90c51c7e0f3d611e5 (patch)
treedb31ae8efe24f8ad972df4736090cc7304e31814
parentce0a3da138f5de23f0647d991fd4a1dfaef17286 (diff)
downloaduhd-695dd535d5a7419f467598a90c51c7e0f3d611e5.tar.gz
uhd-695dd535d5a7419f467598a90c51c7e0f3d611e5.tar.bz2
uhd-695dd535d5a7419f467598a90c51c7e0f3d611e5.zip
added set freq with lo offset to simple usrp wrapper
-rw-r--r--host/include/uhd/usrp/simple_usrp.hpp2
-rw-r--r--host/lib/usrp/simple_usrp.cpp8
2 files changed, 10 insertions, 0 deletions
diff --git a/host/include/uhd/usrp/simple_usrp.hpp b/host/include/uhd/usrp/simple_usrp.hpp
index c4142b4e6..6ba1b90dd 100644
--- a/host/include/uhd/usrp/simple_usrp.hpp
+++ b/host/include/uhd/usrp/simple_usrp.hpp
@@ -112,6 +112,7 @@ public:
virtual double get_rx_rate(void) = 0;
virtual tune_result_t set_rx_freq(double freq) = 0;
+ virtual tune_result_t set_rx_freq(double freq, double lo_off) = 0;
virtual freq_range_t get_rx_freq_range(void) = 0;
virtual void set_rx_gain(float gain) = 0;
@@ -131,6 +132,7 @@ public:
virtual double get_tx_rate(void) = 0;
virtual tune_result_t set_tx_freq(double freq) = 0;
+ virtual tune_result_t set_tx_freq(double freq, double lo_off) = 0;
virtual freq_range_t get_tx_freq_range(void) = 0;
virtual void set_tx_gain(float gain) = 0;
diff --git a/host/lib/usrp/simple_usrp.cpp b/host/lib/usrp/simple_usrp.cpp
index a8c104485..f4aa82669 100644
--- a/host/lib/usrp/simple_usrp.cpp
+++ b/host/lib/usrp/simple_usrp.cpp
@@ -121,6 +121,10 @@ public:
return tune_rx_subdev_and_ddc(_rx_subdev, _rx_dsp, target_freq);
}
+ tune_result_t set_rx_freq(double target_freq, double lo_off){
+ return tune_rx_subdev_and_ddc(_rx_subdev, _rx_dsp, target_freq, lo_off);
+ }
+
freq_range_t get_rx_freq_range(void){
return _rx_subdev[SUBDEV_PROP_FREQ_RANGE].as<freq_range_t>();
}
@@ -168,6 +172,10 @@ public:
return tune_tx_subdev_and_duc(_tx_subdev, _tx_dsp, target_freq);
}
+ tune_result_t set_tx_freq(double target_freq, double lo_off){
+ return tune_tx_subdev_and_duc(_tx_subdev, _tx_dsp, target_freq, lo_off);
+ }
+
freq_range_t get_tx_freq_range(void){
return _tx_subdev[SUBDEV_PROP_FREQ_RANGE].as<freq_range_t>();
}