diff options
-rw-r--r-- | host/include/uhd/types/tune_request.hpp | 15 | ||||
-rw-r--r-- | host/lib/usrp/multi_usrp.cpp | 8 |
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; |