summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2013-01-23 04:47:02 -0800
committerJosh Blum <josh@joshknows.com>2013-01-23 04:47:02 -0800
commitbbb5bb2b48e279685349ca07d17936dc30b704b7 (patch)
tree5af10af4d645b2f06c2ba330efd26c4ca2488ed3
parent1c21d1bc22e35bdb4b91450656974148d11519e0 (diff)
parent43e0bd799e5f3dbee8429b16b61b88d25ae2f957 (diff)
downloaduhd-bbb5bb2b48e279685349ca07d17936dc30b704b7.tar.gz
uhd-bbb5bb2b48e279685349ca07d17936dc30b704b7.tar.bz2
uhd-bbb5bb2b48e279685349ca07d17936dc30b704b7.zip
Merge branch 'next'
-rw-r--r--host/include/uhd/types/tune_request.hpp15
-rw-r--r--host/lib/usrp/multi_usrp.cpp8
2 files changed, 22 insertions, 1 deletions
diff --git a/host/include/uhd/types/tune_request.hpp b/host/include/uhd/types/tune_request.hpp
index 9c498bfe9..dd6123a9f 100644
--- a/host/include/uhd/types/tune_request.hpp
+++ b/host/include/uhd/types/tune_request.hpp
@@ -1,5 +1,5 @@
//
-// Copyright 2010 Ettus Research LLC
+// Copyright 2010-2012 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
@@ -19,6 +19,7 @@
#define INCLUDED_UHD_TYPES_TUNE_REQUEST_HPP
#include <uhd/config.hpp>
+#include <uhd/types/device_addr.hpp>
namespace uhd{
@@ -88,6 +89,18 @@ namespace uhd{
*/
double dsp_freq;
+ /*!
+ * The args parameter is used to pass arbitrary key/value pairs.
+ * Possible keys used by args (depends on implementation):
+ *
+ * - mode_n: Allows the user to tell the daughterboard tune code
+ * to choose between an integer N diviver or fractional N divider.
+ * Default is fractional N on boards that support fractional N tuning.
+ * Fractional N provides greater tuning acuracy at the expense of spurs.
+ * Possible options for this key: "integer" or "fractional".
+ */
+ device_addr_t args;
+
};
} //namespace uhd
diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp
index 0331cf93a..46dd8b670 100644
--- a/host/lib/usrp/multi_usrp.cpp
+++ b/host/lib/usrp/multi_usrp.cpp
@@ -140,6 +140,14 @@ static tune_result_t tune_xx_subdev_and_dsp(
}
//------------------------------------------------------------------
+ //-- poke the tune request args into the dboard
+ //------------------------------------------------------------------
+ if (rf_fe_subtree->exists("tune_args"))
+ {
+ rf_fe_subtree->access<device_addr_t>("tune_args").set(tune_request.args);
+ }
+
+ //------------------------------------------------------------------
//-- set the RF frequency depending upon the policy
//------------------------------------------------------------------
double target_rf_freq = 0.0;