diff options
author | Nicholas Corgan <nick.corgan@ettus.com> | 2014-01-24 07:17:42 -0800 |
---|---|---|
committer | Nicholas Corgan <nick.corgan@ettus.com> | 2014-01-24 07:17:42 -0800 |
commit | 6cdc9cdd5b94a0809ddce3bdba4367694a88ab66 (patch) | |
tree | a833a869c5c890caa2a4dbcf0b215b7eb244cfc9 /host/examples/rx_samples_to_udp.cpp | |
parent | 937a689ab3170bcec7a9f45dfebc17264b11838e (diff) | |
download | uhd-6cdc9cdd5b94a0809ddce3bdba4367694a88ab66.tar.gz uhd-6cdc9cdd5b94a0809ddce3bdba4367694a88ab66.tar.bz2 uhd-6cdc9cdd5b94a0809ddce3bdba4367694a88ab66.zip |
120 MHz daughterboard support, Integer-N tuning, ADF435x code consolidation
* Added support for new CBX-120, SBX-120, and WBX-120 daughterboards
* Added implementation of Integer-N tuning for all CBX, SBX, and WBX daughterboards
* Added --int-n option to examples to show how to use Integer-N tuning API
* Removed duplicate ADF4350/ADF4351 code and moved it to common/adf435x_common.cpp
Diffstat (limited to 'host/examples/rx_samples_to_udp.cpp')
-rw-r--r-- | host/examples/rx_samples_to_udp.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/host/examples/rx_samples_to_udp.cpp b/host/examples/rx_samples_to_udp.cpp index 0b3c6dce3..72fb54bd3 100644 --- a/host/examples/rx_samples_to_udp.cpp +++ b/host/examples/rx_samples_to_udp.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010-2012 Ettus Research LLC +// Copyright 2010-2012,2014 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -15,6 +15,7 @@ // along with this program. If not, see <http://www.gnu.org/licenses/>. // +#include <uhd/types/tune_request.hpp> #include <uhd/utils/thread_priority.hpp> #include <uhd/utils/safe_main.hpp> #include <uhd/usrp/multi_usrp.hpp> @@ -52,6 +53,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ ("port", po::value<std::string>(&port)->default_value("7124"), "server udp port") ("addr", po::value<std::string>(&addr)->default_value("192.168.1.10"), "resolvable server address") ("ref", po::value<std::string>(&ref)->default_value("internal"), "waveform type (internal, external, mimo)") + ("int-n", "tune USRP with integer-N tuning") ; po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); @@ -79,7 +81,9 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //set the rx center frequency std::cout << boost::format("Setting RX Freq: %f Mhz...") % (freq/1e6) << std::endl; - usrp->set_rx_freq(freq); + uhd::tune_request_t tune_request(freq); + if(vm.count("int-n")) tune_request.args = uhd::device_addr_t("mode_n=int-n"); + usrp->set_rx_freq(tune_request); std::cout << boost::format("Actual RX Freq: %f Mhz...") % (usrp->get_rx_freq()/1e6) << std::endl << std::endl; //set the rx rf gain |