diff options
Diffstat (limited to 'host/include/uhd/usrp')
-rw-r--r-- | host/include/uhd/usrp/CMakeLists.txt | 15 | ||||
-rw-r--r-- | host/include/uhd/usrp/dboard_interface.hpp | 75 | ||||
-rw-r--r-- | host/include/uhd/usrp/dboard_manager.hpp | 2 | ||||
-rw-r--r-- | host/include/uhd/usrp/dboard_props.hpp | 38 | ||||
-rw-r--r-- | host/include/uhd/usrp/device_props.hpp | 57 | ||||
-rw-r--r-- | host/include/uhd/usrp/dsp_props.hpp | 40 | ||||
-rw-r--r-- | host/include/uhd/usrp/mboard_props.hpp | 50 | ||||
-rw-r--r-- | host/include/uhd/usrp/simple_usrp.hpp | 96 | ||||
-rw-r--r-- | host/include/uhd/usrp/subdev_props.hpp | 49 | ||||
-rw-r--r-- | host/include/uhd/usrp/tune_helper.hpp | 79 |
10 files changed, 456 insertions, 45 deletions
diff --git a/host/include/uhd/usrp/CMakeLists.txt b/host/include/uhd/usrp/CMakeLists.txt index b9be370bd..c00daaaf0 100644 --- a/host/include/uhd/usrp/CMakeLists.txt +++ b/host/include/uhd/usrp/CMakeLists.txt @@ -17,11 +17,26 @@ INSTALL(FILES + #### props headers ### + dboard_props.hpp + device_props.hpp + dsp_props.hpp + mboard_props.hpp + subdev_props.hpp + + #### dboard headers ### dboard_base.hpp dboard_id.hpp dboard_interface.hpp dboard_manager.hpp + + ### usrp headers ### usrp_e.hpp usrp2.hpp + + ### utilities ### + tune_helper.hpp + simple_usrp.hpp + DESTINATION ${INCLUDE_DIR}/uhd/usrp ) diff --git a/host/include/uhd/usrp/dboard_interface.hpp b/host/include/uhd/usrp/dboard_interface.hpp index c779431ab..b3bab131d 100644 --- a/host/include/uhd/usrp/dboard_interface.hpp +++ b/host/include/uhd/usrp/dboard_interface.hpp @@ -38,32 +38,34 @@ public: //tells the host which unit to use enum unit_type_t{ - UNIT_TYPE_RX, - UNIT_TYPE_TX + UNIT_TYPE_RX = 'r', + UNIT_TYPE_TX = 't' }; //tells the host which device to use enum spi_dev_t{ - SPI_TX_DEV, - SPI_RX_DEV + SPI_DEV_RX = 'r', + SPI_DEV_TX = 't' }; - //args for writing spi data - enum spi_push_t{ - SPI_PUSH_RISE, - SPI_PUSH_FALL - }; - - //args for reading spi data - enum spi_latch_t{ - SPI_LATCH_RISE, - SPI_LATCH_FALL + //args for spi format + enum spi_edge_t{ + SPI_EDGE_RISE = 'r', + SPI_EDGE_FALL = 'f' }; //tell the host which gpio bank enum gpio_bank_t{ - GPIO_TX_BANK, - GPIO_RX_BANK + GPIO_BANK_RX = 'r', + GPIO_BANK_TX = 't' + }; + + //possible atr registers + enum atr_reg_t{ + ATR_REG_IDLE = 'i', + ATR_REG_TX_ONLY = 't', + ATR_REG_RX_ONLY = 'r', + ATR_REG_FULL_DUPLEX = 'f' }; //structors @@ -87,17 +89,13 @@ public: virtual int read_aux_adc(unit_type_t unit, int which_adc) = 0; /*! - * Set daughterboard ATR register. - * The ATR register for a particular bank has 2 values: - * one value when transmitting, one when receiving. - * The mask controls which pins are controlled by ATR. + * Set a daughterboard ATR register. * - * \param bank GPIO_TX_BANK or GPIO_RX_BANK - * \param tx_value 16-bits, 0=FPGA output low, 1=FPGA output high - * \param rx_value 16-bits, 0=FPGA output low, 1=FPGA output high - * \param mask 16-bits, 0=software, 1=atr + * \param bank GPIO_TX_BANK or GPIO_RX_BANK + * \param reg which ATR register to set + * \param value 16-bits, 0=FPGA output low, 1=FPGA output high */ - virtual void set_atr_reg(gpio_bank_t bank, boost::uint16_t tx_value, boost::uint16_t rx_value, boost::uint16_t mask) = 0; + virtual void set_atr_reg(gpio_bank_t bank, atr_reg_t reg, boost::uint16_t value) = 0; /*! * Set daughterboard GPIO data direction register. @@ -108,14 +106,6 @@ public: virtual void set_gpio_ddr(gpio_bank_t bank, boost::uint16_t value) = 0; /*! - * Set daughterboard GPIO pin values. - * - * \param bank GPIO_TX_BANK or GPIO_RX_BANK - * \param value 16 bits, 0=low, 1=high - */ - virtual void write_gpio(gpio_bank_t bank, boost::uint16_t value) = 0; - - /*! * Read daughterboard GPIO pin values * * \param bank GPIO_TX_BANK or GPIO_RX_BANK @@ -142,32 +132,31 @@ public: * \brief Write data to SPI bus peripheral. * * \param dev which spi device - * \param push args for writing + * \param edge args for format * \param buf the data to write */ - void write_spi(spi_dev_t dev, spi_push_t push, const byte_vector_t &buf); + void write_spi(spi_dev_t dev, spi_edge_t edge, const byte_vector_t &buf); /*! * \brief Read data to SPI bus peripheral. * * \param dev which spi device - * \param latch args for reading + * \param edge args for format * \param num_bytes number of bytes to read * \return the data that was read */ - byte_vector_t read_spi(spi_dev_t dev, spi_latch_t latch, size_t num_bytes); + byte_vector_t read_spi(spi_dev_t dev, spi_edge_t edge, size_t num_bytes); /*! * \brief Read and write data to SPI bus peripheral. * The data read back will be the same length as the input buffer. * * \param dev which spi device - * \param latch args for reading - * \param push args for clock + * \param edge args for format * \param buf the data to write * \return the data that was read */ - byte_vector_t read_write_spi(spi_dev_t dev, spi_latch_t latch, spi_push_t push, const byte_vector_t &buf); + byte_vector_t read_write_spi(spi_dev_t dev, spi_edge_t edge, const byte_vector_t &buf); /*! * \brief Get the rate of the rx dboard clock. @@ -186,16 +175,14 @@ private: * \brief Read and write data to SPI bus peripheral. * * \param dev which spi device - * \param latch args for reading - * \param push args for clock + * \param edge args for format * \param buf the data to write * \param readback false for write only * \return the data that was read */ virtual byte_vector_t transact_spi( spi_dev_t dev, - spi_latch_t latch, - spi_push_t push, + spi_edge_t edge, const byte_vector_t &buf, bool readback ) = 0; diff --git a/host/include/uhd/usrp/dboard_manager.hpp b/host/include/uhd/usrp/dboard_manager.hpp index c7c091220..ed8ee73ef 100644 --- a/host/include/uhd/usrp/dboard_manager.hpp +++ b/host/include/uhd/usrp/dboard_manager.hpp @@ -19,7 +19,7 @@ #define INCLUDED_UHD_USRP_DBOARD_MANAGER_HPP #include <uhd/config.hpp> -#include <uhd/props.hpp> +#include <uhd/utils/props.hpp> #include <uhd/usrp/dboard_base.hpp> #include <uhd/usrp/dboard_id.hpp> #include <boost/utility.hpp> diff --git a/host/include/uhd/usrp/dboard_props.hpp b/host/include/uhd/usrp/dboard_props.hpp new file mode 100644 index 000000000..3b290319f --- /dev/null +++ b/host/include/uhd/usrp/dboard_props.hpp @@ -0,0 +1,38 @@ +// +// Copyright 2010 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 +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +// + +#ifndef INCLUDED_UHD_USRP_DBOARD_PROPS_HPP +#define INCLUDED_UHD_USRP_DBOARD_PROPS_HPP + +#include <uhd/utils/props.hpp> + +namespace uhd{ namespace usrp{ + + /*! + * Possible device dboard properties + */ + enum dboard_prop_t{ + DBOARD_PROP_NAME = 'n', //ro, std::string + DBOARD_PROP_SUBDEV = 's', //ro, wax::obj + DBOARD_PROP_SUBDEV_NAMES = 'S', //ro, prop_names_t + DBOARD_PROP_USED_SUBDEVS = 'u' //ro, prop_names_t + //DBOARD_PROP_CODEC //ro, wax::obj //----> not sure, dont have to deal with yet + }; + +}} //namespace + +#endif /* INCLUDED_UHD_USRP_DBOARD_PROPS_HPP */ diff --git a/host/include/uhd/usrp/device_props.hpp b/host/include/uhd/usrp/device_props.hpp new file mode 100644 index 000000000..b8f6f5cd4 --- /dev/null +++ b/host/include/uhd/usrp/device_props.hpp @@ -0,0 +1,57 @@ +// +// Copyright 2010 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 +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +// + +#ifndef INCLUDED_UHD_USRP_DEVICE_PROPS_HPP +#define INCLUDED_UHD_USRP_DEVICE_PROPS_HPP + +#include <uhd/utils/props.hpp> + +namespace uhd{ namespace usrp{ + + /*! + * Possible device properties: + * In general, a device will have a single mboard. + * In certain mimo applications, multiple boards + * will be present in the interface for configuration. + */ + enum device_prop_t{ + DEVICE_PROP_NAME = 'n', //ro, std::string + DEVICE_PROP_MBOARD = 'm', //ro, wax::obj + DEVICE_PROP_MBOARD_NAMES = 'M', //ro, prop_names_t + DEVICE_PROP_MAX_RX_SAMPLES = 'r', //ro, size_t + DEVICE_PROP_MAX_TX_SAMPLES = 't' //ro, size_t + }; + + //////////////////////////////////////////////////////////////////////// + /*! ------ not dealing with yet, commented out ------------ + * Possible device codec properties: + * A codec is expected to have a rate and gain elements. + * Other properties can be discovered through the others prop. + */ + /*enum codec_prop_t{ + CODEC_PROP_NAME, //ro, std::string + CODEC_PROP_OTHERS, //ro, prop_names_t + CODEC_PROP_GAIN, //rw, gain_t + CODEC_PROP_GAIN_RANGE, //ro, gain_range_t + CODEC_PROP_GAIN_NAMES, //ro, prop_names_t + //CODEC_PROP_CLOCK_RATE //ro, freq_t //----> not sure we care to know + };*/ + + +}} //namespace + +#endif /* INCLUDED_UHD_USRP_DEVICE_PROPS_HPP */ diff --git a/host/include/uhd/usrp/dsp_props.hpp b/host/include/uhd/usrp/dsp_props.hpp new file mode 100644 index 000000000..60c0df942 --- /dev/null +++ b/host/include/uhd/usrp/dsp_props.hpp @@ -0,0 +1,40 @@ +// +// Copyright 2010 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 +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +// + +#ifndef INCLUDED_UHD_USRP_DSP_PROPS_HPP +#define INCLUDED_UHD_USRP_DSP_PROPS_HPP + +#include <uhd/utils/props.hpp> + +namespace uhd{ namespace usrp{ + + /*! + * Possible device dsp properties: + * A dsp can have a wide range of possible properties. + * A ddc would have a properties "decim", "freq", "taps"... + * Other properties could be gains, complex scalars, enables... + * For this reason the only required properties of a dsp is a name + * and a property to get list of other possible properties. + */ + enum dsp_prop_t{ + DSP_PROP_NAME = 'n', //ro, std::string + DSP_PROP_OTHERS = 'o' //ro, prop_names_t + }; + +}} //namespace + +#endif /* INCLUDED_UHD_USRP_DSP_PROPS_HPP */ diff --git a/host/include/uhd/usrp/mboard_props.hpp b/host/include/uhd/usrp/mboard_props.hpp new file mode 100644 index 000000000..cfc1f412e --- /dev/null +++ b/host/include/uhd/usrp/mboard_props.hpp @@ -0,0 +1,50 @@ +// +// Copyright 2010 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 +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +// + +#ifndef INCLUDED_UHD_USRP_MBOARD_PROPS_HPP +#define INCLUDED_UHD_USRP_MBOARD_PROPS_HPP + +#include <uhd/utils/props.hpp> + +namespace uhd{ namespace usrp{ + + /*! + * Possible device mboard properties: + * The general mboard properties are listed below. + * Custom properties can be identified with a string + * and discovered though the others property. + */ + enum mboard_prop_t{ + MBOARD_PROP_NAME = 'n', //ro, std::string + MBOARD_PROP_OTHERS = 'o', //ro, prop_names_t + MBOARD_PROP_CLOCK_RATE = 'c', //ro, double + MBOARD_PROP_RX_DSP = 'd', //ro, wax::obj + MBOARD_PROP_RX_DSP_NAMES = 'D', //ro, prop_names_t + MBOARD_PROP_TX_DSP = 'u', //ro, wax::obj + MBOARD_PROP_TX_DSP_NAMES = 'U', //ro, prop_names_t + MBOARD_PROP_RX_DBOARD = 'e', //ro, wax::obj + MBOARD_PROP_RX_DBOARD_NAMES = 'E', //ro, prop_names_t + MBOARD_PROP_TX_DBOARD = 'v', //ro, wax::obj + MBOARD_PROP_TX_DBOARD_NAMES = 'V', //ro, prop_names_t + MBOARD_PROP_CLOCK_CONFIG = 'C', //rw, clock_config_t + MBOARD_PROP_TIME_NOW = 't', //wo, time_spec_t + MBOARD_PROP_TIME_NEXT_PPS = 'T' //wo, time_spec_t + }; + +}} //namespace + +#endif /* INCLUDED_UHD_USRP_MBOARD_PROPS_HPP */ diff --git a/host/include/uhd/usrp/simple_usrp.hpp b/host/include/uhd/usrp/simple_usrp.hpp new file mode 100644 index 000000000..2d6ad2a0f --- /dev/null +++ b/host/include/uhd/usrp/simple_usrp.hpp @@ -0,0 +1,96 @@ +// +// Copyright 2010 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 +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +// + +#ifndef INCLUDED_UHD_USRP_SIMPLE_USRP_HPP +#define INCLUDED_UHD_USRP_SIMPLE_USRP_HPP + +#include <uhd/config.hpp> +#include <uhd/device.hpp> +#include <uhd/types/ranges.hpp> +#include <uhd/types/stream_cmd.hpp> +#include <uhd/types/clock_config.hpp> +#include <uhd/types/tune_result.hpp> +#include <boost/shared_ptr.hpp> +#include <boost/utility.hpp> +#include <vector> + +namespace uhd{ namespace usrp{ + +/*! + * The simple USRP device class: + * A simple usrp facilitates ease-of-use for most use-case scenarios. + * The wrapper provides convenience functions to tune the devices + * as well as to set the dboard gains, antennas, and other properties. + */ +class UHD_API simple_usrp : boost::noncopyable{ +public: + typedef boost::shared_ptr<simple_usrp> sptr; + static sptr make(const std::string &args); + + virtual device::sptr get_device(void) = 0; + + virtual std::string get_name(void) = 0; + + /******************************************************************* + * Misc + ******************************************************************/ + virtual void set_time_now(const time_spec_t &time_spec) = 0; + virtual void set_time_next_pps(const time_spec_t &time_spec) = 0; + virtual void issue_stream_cmd(const stream_cmd_t &stream_cmd) = 0; + virtual void set_clock_config(const clock_config_t &clock_config) = 0; + virtual double get_clock_rate(void) = 0; + + /******************************************************************* + * RX methods + ******************************************************************/ + virtual void set_rx_rate(double rate) = 0; + virtual double get_rx_rate(void) = 0; + virtual std::vector<double> get_rx_rates(void) = 0; + + virtual tune_result_t set_rx_freq(double freq) = 0; + virtual freq_range_t get_rx_freq_range(void) = 0; + + virtual void set_rx_gain(float gain) = 0; + virtual float get_rx_gain(void) = 0; + virtual gain_range_t get_rx_gain_range(void) = 0; + + virtual void set_rx_antenna(const std::string &ant) = 0; + virtual std::string get_rx_antenna(void) = 0; + virtual std::vector<std::string> get_rx_antennas(void) = 0; + + /******************************************************************* + * TX methods + ******************************************************************/ + virtual void set_tx_rate(double rate) = 0; + virtual double get_tx_rate(void) = 0; + virtual std::vector<double> get_tx_rates(void) = 0; + + virtual tune_result_t set_tx_freq(double freq) = 0; + virtual freq_range_t get_tx_freq_range(void) = 0; + + virtual void set_tx_gain(float gain) = 0; + virtual float get_tx_gain(void) = 0; + virtual gain_range_t get_tx_gain_range(void) = 0; + + virtual void set_tx_antenna(const std::string &ant) = 0; + virtual std::string get_tx_antenna(void) = 0; + virtual std::vector<std::string> get_tx_antennas(void) = 0; +}; + +}} + +#endif /* INCLUDED_UHD_USRP_SIMPLE_USRP_HPP */ diff --git a/host/include/uhd/usrp/subdev_props.hpp b/host/include/uhd/usrp/subdev_props.hpp new file mode 100644 index 000000000..92d18340b --- /dev/null +++ b/host/include/uhd/usrp/subdev_props.hpp @@ -0,0 +1,49 @@ +// +// Copyright 2010 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 +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +// + +#ifndef INCLUDED_UHD_USRP_SUBDEV_PROPS_HPP +#define INCLUDED_UHD_USRP_SUBDEV_PROPS_HPP + +#include <uhd/utils/props.hpp> + +namespace uhd{ namespace usrp{ + + /*! + * Possible device subdev properties + */ + enum subdev_prop_t{ + SUBDEV_PROP_NAME = 'n', //ro, std::string + SUBDEV_PROP_OTHERS = 'o', //ro, prop_names_t + SUBDEV_PROP_GAIN = 'g', //rw, float + SUBDEV_PROP_GAIN_RANGE = 'r', //ro, gain_range_t + SUBDEV_PROP_GAIN_NAMES = 'G', //ro, prop_names_t + SUBDEV_PROP_FREQ = 'f', //rw, double + SUBDEV_PROP_FREQ_RANGE = 'F', //ro, freq_range_t + SUBDEV_PROP_ANTENNA = 'a', //rw, std::string + SUBDEV_PROP_ANTENNA_NAMES = 'A', //ro, prop_names_t + SUBDEV_PROP_ENABLED = 'e', //rw, bool + SUBDEV_PROP_QUADRATURE = 'q', //ro, bool + SUBDEV_PROP_IQ_SWAPPED = 'i', //ro, bool + SUBDEV_PROP_SPECTRUM_INVERTED = 's', //ro, bool + SUBDEV_PROP_LO_INTERFERES = 'l' //ro, bool + //SUBDEV_PROP_RSSI, //ro, float //----> not on all boards, use named prop + //SUBDEV_PROP_BANDWIDTH //rw, double //----> not on all boards, use named prop + }; + +}} //namespace + +#endif /* INCLUDED_UHD_USRP_SUBDEV_PROPS_HPP */ diff --git a/host/include/uhd/usrp/tune_helper.hpp b/host/include/uhd/usrp/tune_helper.hpp new file mode 100644 index 000000000..f1e276d4f --- /dev/null +++ b/host/include/uhd/usrp/tune_helper.hpp @@ -0,0 +1,79 @@ +// +// Copyright 2010 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 +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +// + +#ifndef INCLUDED_UHD_USRP_TUNE_HELPER_HPP +#define INCLUDED_UHD_USRP_TUNE_HELPER_HPP + +#include <uhd/config.hpp> +#include <uhd/wax.hpp> +#include <uhd/types/tune_result.hpp> + +namespace uhd{ namespace usrp{ + +/*! + * Tune a rx chain to the desired frequency: + * The IF of the subdevice is set as close as possible to + * the given target frequency + the LO offset (when applicable). + * The ddc cordic is setup to bring the IF down to baseband. + * \param subdev the dboard subdevice object with properties + * \param ddc the ddc properties object (with "if_rate", "bb_rate", "freq") + * \param target_freq the desired center frequency + * \param lo_offset an offset for the subdevice IF from center + * \return a tune result struct + */ +UHD_API tune_result_t tune_rx_subdev_and_ddc( + wax::obj subdev, wax::obj ddc, + double target_freq, double lo_offset +); + +/*! + * Tune a rx chain to the desired frequency: + * Same as the above, except the LO offset + * is calculated based on the subdevice and BW. + */ +UHD_API tune_result_t tune_rx_subdev_and_ddc( + wax::obj subdev, wax::obj ddc, double target_freq +); + +/*! + * Tune a tx chain to the desired frequency: + * The IF of the subdevice is set as close as possible to + * the given target frequency + the LO offset (when applicable). + * The duc cordic is setup to bring the baseband up to IF. + * \param subdev the dboard subdevice object with properties + * \param duc the duc properties object (with "if_rate", "bb_rate", "freq") + * \param target_freq the desired center frequency + * \param lo_offset an offset for the subdevice IF from center + * \return a tune result struct + */ +UHD_API tune_result_t tune_tx_subdev_and_duc( + wax::obj subdev, wax::obj duc, + double target_freq, double lo_offset +); + +/*! + * Tune a tx chain to the desired frequency: + * Same as the above, except the LO offset + * is calculated based on the subdevice and BW. + */ +UHD_API tune_result_t tune_tx_subdev_and_duc( + wax::obj subdev, wax::obj duc, double target_freq +); + +}} + +#endif /* INCLUDED_UHD_USRP_TUNE_HELPER_HPP */ |