diff options
author | jcorgan | 2009-02-04 23:06:02 +0000 |
---|---|---|
committer | jcorgan | 2009-02-04 23:06:02 +0000 |
commit | 9b388ac1184c71449c49fb44551c5c38f8098d8e (patch) | |
tree | 619f89d81e2030a831063415c29d78c739e47c1c /gr-usrp2/src | |
parent | 68282b6ffed904bb55700314a600fe5d731dd0ea (diff) | |
download | gnuradio-9b388ac1184c71449c49fb44551c5c38f8098d8e.tar.gz gnuradio-9b388ac1184c71449c49fb44551c5c38f8098d8e.tar.bz2 gnuradio-9b388ac1184c71449c49fb44551c5c38f8098d8e.zip |
Merged r10383:10390 from jcorgan/u2-wip into trunk.
* Implements daughterboard independent LO offset tuning
* Removes RFX specific LO offset code
* Adds 'set_lo_offset' to libusrp2 and Python API
* Adds --lo-offset to usrp2_fft.py and usrp2_rx_cfile.py
* Ensures daughterboards are reset to default values at
startup.
Trunk passes distcheck.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10392 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gr-usrp2/src')
-rw-r--r-- | gr-usrp2/src/usrp2.i | 2 | ||||
-rw-r--r-- | gr-usrp2/src/usrp2_sink_base.cc | 6 | ||||
-rw-r--r-- | gr-usrp2/src/usrp2_sink_base.h | 5 | ||||
-rw-r--r-- | gr-usrp2/src/usrp2_source_base.cc | 6 | ||||
-rw-r--r-- | gr-usrp2/src/usrp2_source_base.h | 7 |
5 files changed, 25 insertions, 1 deletions
diff --git a/gr-usrp2/src/usrp2.i b/gr-usrp2/src/usrp2.i index c979750a8..c9a4af590 100644 --- a/gr-usrp2/src/usrp2.i +++ b/gr-usrp2/src/usrp2.i @@ -67,6 +67,7 @@ public: bool set_gain(double gain); %rename(_real_set_center_freq) set_center_freq; + bool set_lo_offset(double frequency); bool set_center_freq(double frequency, usrp2::tune_result *r); bool set_decim(int decimation_factor); bool set_scale_iq(int scale_i, int scale_q); @@ -132,6 +133,7 @@ public: bool set_gain(double gain); %rename(_real_set_center_freq) set_center_freq; + bool set_lo_offset(double frequency); bool set_center_freq(double frequency, usrp2::tune_result *r); bool set_interp(int interp_factor); bool set_scale_iq(int scale_i, int scale_q); diff --git a/gr-usrp2/src/usrp2_sink_base.cc b/gr-usrp2/src/usrp2_sink_base.cc index 579aaaa4c..8118407c5 100644 --- a/gr-usrp2/src/usrp2_sink_base.cc +++ b/gr-usrp2/src/usrp2_sink_base.cc @@ -53,6 +53,12 @@ usrp2_sink_base::set_gain(double gain) } bool +usrp2_sink_base::set_lo_offset(double frequency) +{ + return d_u2->set_tx_lo_offset(frequency); +} + +bool usrp2_sink_base::set_center_freq(double frequency, usrp2::tune_result *tr) { return d_u2->set_tx_center_freq(frequency, tr); diff --git a/gr-usrp2/src/usrp2_sink_base.h b/gr-usrp2/src/usrp2_sink_base.h index fad965623..37905f4e8 100644 --- a/gr-usrp2/src/usrp2_sink_base.h +++ b/gr-usrp2/src/usrp2_sink_base.h @@ -46,6 +46,11 @@ public: bool set_gain(double gain); /*! + * \brief Set transmitter LO offset frequency + */ + bool set_lo_offset(double frequency); + + /*! * \brief Set transmitter center frequency */ bool set_center_freq(double frequency, usrp2::tune_result *tr); diff --git a/gr-usrp2/src/usrp2_source_base.cc b/gr-usrp2/src/usrp2_source_base.cc index 1ed4d55d7..8bcac5d69 100644 --- a/gr-usrp2/src/usrp2_source_base.cc +++ b/gr-usrp2/src/usrp2_source_base.cc @@ -53,6 +53,12 @@ usrp2_source_base::set_gain(double gain) } bool +usrp2_source_base::set_lo_offset(double frequency) +{ + return d_u2->set_rx_lo_offset(frequency); +} + +bool usrp2_source_base::set_center_freq(double frequency, usrp2::tune_result *tr) { return d_u2->set_rx_center_freq(frequency, tr); diff --git a/gr-usrp2/src/usrp2_source_base.h b/gr-usrp2/src/usrp2_source_base.h index 998a022da..f98d329fd 100644 --- a/gr-usrp2/src/usrp2_source_base.h +++ b/gr-usrp2/src/usrp2_source_base.h @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2008 Free Software Foundation, Inc. + * Copyright 2008,2009 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -46,6 +46,11 @@ public: bool set_gain(double gain); /*! + * \brief Set receive LO offset frequency + */ + bool set_lo_offset(double frequency); + + /*! * \brief Set receiver center frequency */ bool set_center_freq(double frequency, usrp2::tune_result *tr); |