From 6cdc9cdd5b94a0809ddce3bdba4367694a88ab66 Mon Sep 17 00:00:00 2001 From: Nicholas Corgan Date: Fri, 24 Jan 2014 07:17:42 -0800 Subject: 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 --- host/examples/tx_samples_from_file.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'host/examples/tx_samples_from_file.cpp') diff --git a/host/examples/tx_samples_from_file.cpp b/host/examples/tx_samples_from_file.cpp index f9447c25d..6926f8690 100644 --- a/host/examples/tx_samples_from_file.cpp +++ b/host/examples/tx_samples_from_file.cpp @@ -1,5 +1,5 @@ // -// Copyright 2011-2012 Ettus Research LLC +// Copyright 2011-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 . // +#include #include #include #include @@ -90,6 +91,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ ("wirefmt", po::value(&wirefmt)->default_value("sc16"), "wire format (sc8 or sc16)") ("delay", po::value(&delay)->default_value(0.0), "specify a delay between repeated transmission of file") ("repeat", "repeatedly transmit file") + ("int-n", "tune USRP with integer-n tuning") ; po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); @@ -131,7 +133,9 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ return ~0; } std::cout << boost::format("Setting TX Freq: %f MHz...") % (freq/1e6) << std::endl; - usrp->set_tx_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_tx_freq(tune_request); std::cout << boost::format("Actual TX Freq: %f MHz...") % (usrp->get_tx_freq()/1e6) << std::endl << std::endl; //set the rf gain -- cgit v1.2.3