aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/magnesium/magnesium_radio_ctrl_impl.hpp
diff options
context:
space:
mode:
authorMoritz Fischer <moritz.fischer@ettus.com>2017-04-12 17:54:02 -0700
committerMartin Braun <martin.braun@ettus.com>2017-12-22 15:03:45 -0800
commit58510168d5a033af1450f3ddf4d87ab8f8fa1a6a (patch)
treed4e9fa59394d2ba71daa7c42c429c513f7e41a30 /host/lib/usrp/magnesium/magnesium_radio_ctrl_impl.hpp
parent7f7111198816cbf1e0597f7ecc9f46e4c26e916b (diff)
downloaduhd-58510168d5a033af1450f3ddf4d87ab8f8fa1a6a.tar.gz
uhd-58510168d5a033af1450f3ddf4d87ab8f8fa1a6a.tar.bz2
uhd-58510168d5a033af1450f3ddf4d87ab8f8fa1a6a.zip
lib: usrp: magnesium: Stub out a radio_ctrl for magnesium
Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com> Signed-off-by: Martin Braun <martin.braun@ettus.com>
Diffstat (limited to 'host/lib/usrp/magnesium/magnesium_radio_ctrl_impl.hpp')
-rw-r--r--host/lib/usrp/magnesium/magnesium_radio_ctrl_impl.hpp72
1 files changed, 72 insertions, 0 deletions
diff --git a/host/lib/usrp/magnesium/magnesium_radio_ctrl_impl.hpp b/host/lib/usrp/magnesium/magnesium_radio_ctrl_impl.hpp
new file mode 100644
index 000000000..ea8282532
--- /dev/null
+++ b/host/lib/usrp/magnesium/magnesium_radio_ctrl_impl.hpp
@@ -0,0 +1,72 @@
+//
+// Copyright 2017 Ettus Research
+//
+// 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_LIBUHD_RFNOC_MAGNESIUM_RADIO_CTRL_IMPL_HPP
+#define INCLUDED_LIBUHD_RFNOC_MAGNESIUM_RADIO_CTRL_IMPL_HPP
+
+#include "radio_ctrl_impl.hpp"
+#include <uhd/usrp/dboard_manager.hpp>
+#include <uhd/usrp/gpio_defs.hpp>
+
+namespace uhd {
+ namespace rfnoc {
+
+/*! \brief Provide access to an Magnesium radio.
+ */
+class magnesium_radio_ctrl_impl : public radio_ctrl_impl
+{
+public:
+ typedef boost::shared_ptr<magnesium_radio_ctrl_impl> sptr;
+
+ /************************************************************************
+ * Structors
+ ***********************************************************************/
+ UHD_RFNOC_RADIO_BLOCK_CONSTRUCTOR_DECL(magnesium_radio_ctrl)
+ virtual ~magnesium_radio_ctrl_impl();
+
+ /************************************************************************
+ * API calls
+ ***********************************************************************/
+ double set_rate(double rate);
+
+ void set_tx_antenna(const std::string &ant, const size_t chan);
+ void set_rx_antenna(const std::string &ant, const size_t chan);
+
+ double set_tx_frequency(const double freq, const size_t chan);
+ double set_rx_frequency(const double freq, const size_t chan);
+ double set_rx_bandwidth(const double bandwidth, const size_t chan);
+ double get_tx_frequency(const size_t chan);
+ double get_rx_frequency(const size_t chan);
+ double get_rx_bandwidth(const size_t chan);
+
+ double set_tx_gain(const double gain, const size_t chan);
+ double set_rx_gain(const double gain, const size_t chan);
+
+ size_t get_chan_from_dboard_fe(const std::string &fe, const direction_t dir);
+ std::string get_dboard_fe_from_chan(const size_t chan, const direction_t dir);
+
+ double get_output_samp_rate(size_t port);
+
+
+
+}; /* class radio_ctrl_impl */
+
+}} /* namespace uhd::rfnoc */
+
+#endif /* INCLUDED_LIBUHD_RFNOC_MAGNESIUM_RADIO_CTRL_IMPL_HPP */
+// vim: sw=4 et:
+