aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/simple_usrp.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-07-15 22:59:37 -0700
committerJosh Blum <josh@joshknows.com>2010-07-16 16:51:30 -0700
commitb25e610868752ac55b6f8e0c05bc2e0f7b18e223 (patch)
tree50ca897af5ab54b3d104a03fc9ec11058bfea55d /host/lib/usrp/simple_usrp.cpp
parent2ff23daec6e82661499a7cbbdea8d2ef7cc8711b (diff)
downloaduhd-b25e610868752ac55b6f8e0c05bc2e0f7b18e223.tar.gz
uhd-b25e610868752ac55b6f8e0c05bc2e0f7b18e223.tar.bz2
uhd-b25e610868752ac55b6f8e0c05bc2e0f7b18e223.zip
usrp: added functions to derive tuned frequency, tweaked logic, added unit test
Diffstat (limited to 'host/lib/usrp/simple_usrp.cpp')
-rw-r--r--host/lib/usrp/simple_usrp.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/host/lib/usrp/simple_usrp.cpp b/host/lib/usrp/simple_usrp.cpp
index f06cc9135..5cb9511f4 100644
--- a/host/lib/usrp/simple_usrp.cpp
+++ b/host/lib/usrp/simple_usrp.cpp
@@ -123,11 +123,15 @@ public:
}
tune_result_t set_rx_freq(double target_freq){
- return tune_rx_subdev_and_ddc(_rx_subdev, _rx_dsp, target_freq);
+ return tune_rx_subdev_and_dsp(_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);
+ return tune_rx_subdev_and_dsp(_rx_subdev, _rx_dsp, target_freq, lo_off);
+ }
+
+ double get_rx_freq(void){
+ return derive_freq_from_rx_subdev_and_dsp(_rx_subdev, _rx_dsp);
}
freq_range_t get_rx_freq_range(void){
@@ -178,11 +182,15 @@ public:
}
tune_result_t set_tx_freq(double target_freq){
- return tune_tx_subdev_and_duc(_tx_subdev, _tx_dsp, target_freq);
+ return tune_tx_subdev_and_dsp(_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);
+ return tune_tx_subdev_and_dsp(_tx_subdev, _tx_dsp, target_freq, lo_off);
+ }
+
+ double get_tx_freq(void){
+ return derive_freq_from_tx_subdev_and_dsp(_tx_subdev, _tx_dsp);
}
freq_range_t get_tx_freq_range(void){