aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/include
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2017-05-02 12:54:55 -0700
committerMartin Braun <martin.braun@ettus.com>2017-12-22 15:03:52 -0800
commitdf9ca47ed1301eb131fdc0dbdd1e2ab052549aff (patch)
tree65bf2bf1538663485c5b53c779848039327216fd /mpm/include
parent0c5c2f1834d3912e41ff3aa2480b1fd632aa49bd (diff)
downloaduhd-df9ca47ed1301eb131fdc0dbdd1e2ab052549aff.tar.gz
uhd-df9ca47ed1301eb131fdc0dbdd1e2ab052549aff.tar.bz2
uhd-df9ca47ed1301eb131fdc0dbdd1e2ab052549aff.zip
mpm: eiscat: magnesium: Removed C++-only SPI ifaces
- EISCAT is now Python only with the exception of the definition of the SPI ifaces - Magnesium uses a Python-generated SPI iface - Removed SPI lock from EISCAT dboard
Diffstat (limited to 'mpm/include')
-rw-r--r--mpm/include/mpm/chips/CMakeLists.txt8
-rw-r--r--mpm/include/mpm/chips/lmk04828_spi_iface.hpp33
-rw-r--r--mpm/include/mpm/dboards/eiscat_manager.hpp70
-rw-r--r--mpm/include/mpm/dboards/magnesium_manager.hpp11
4 files changed, 6 insertions, 116 deletions
diff --git a/mpm/include/mpm/chips/CMakeLists.txt b/mpm/include/mpm/chips/CMakeLists.txt
index 35df8d624..e0c0fb18c 100644
--- a/mpm/include/mpm/chips/CMakeLists.txt
+++ b/mpm/include/mpm/chips/CMakeLists.txt
@@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-INSTALL(FILES
- lmk04828_spi_iface.hpp
- DESTINATION ${INCLUDE_DIR}/mpm/lmk04828
-)
+#INSTALL(FILES
+
+ #DESTINATION ${INCLUDE_DIR}/mpm/lmk04828
+#)
diff --git a/mpm/include/mpm/chips/lmk04828_spi_iface.hpp b/mpm/include/mpm/chips/lmk04828_spi_iface.hpp
deleted file mode 100644
index ae897f02f..000000000
--- a/mpm/include/mpm/chips/lmk04828_spi_iface.hpp
+++ /dev/null
@@ -1,33 +0,0 @@
-//
-// Copyright 2017 Ettus Research (National Instruments)
-//
-// 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/>.
-//
-
-#pragma once
-
-#include <mpm/types/regs_iface.hpp>
-
-namespace mpm { namespace chips {
-
- /*! Return a peek/poke interface to the LMK04828
- *
- * Assumption is it is attached to a spidev
- */
- mpm::types::regs_iface::sptr make_lmk04828_iface(
- const std::string &spi_device
- );
-
-}}; /* namespace mpm::chips */
-
diff --git a/mpm/include/mpm/dboards/eiscat_manager.hpp b/mpm/include/mpm/dboards/eiscat_manager.hpp
deleted file mode 100644
index 42f80ff8e..000000000
--- a/mpm/include/mpm/dboards/eiscat_manager.hpp
+++ /dev/null
@@ -1,70 +0,0 @@
-//
-// Copyright 2017 Ettus Research (National Instruments)
-//
-// 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/>.
-//
-
-#pragma once
-
-#include <mpm/types/lockable.hpp>
-#include <mpm/types/regs_iface.hpp>
-#include <memory>
-#include <mutex>
-
-namespace mpm { namespace dboards {
- class eiscat_manager// : public dboard_periph_manager
- {
- public:
- eiscat_manager(
- const std::string &lmk_spidev,
- const std::string &adc0_spidev,
- const std::string &adc1_spidev
- //const std::string &phdac_spidev,
- );
-
- /*! Return a reference to the SPI mutex
- */
- mpm::types::lockable::sptr get_spi_lock() { return _spi_lock; }
-
- /*! Return a reference to the clock chip controls
- */
- mpm::types::regs_iface::sptr get_clock_ctrl(){ return _clock_ctrl; }
-
- mpm::types::regs_iface::sptr get_adc0_ctrl(){ return _adc0_ctrl; }
- mpm::types::regs_iface::sptr get_adc1_ctrl(){ return _adc1_ctrl; }
-
- private:
- std::shared_ptr<std::mutex> _spi_mutex;
-
- mpm::types::lockable::sptr _spi_lock;
- mpm::types::regs_iface::sptr _clock_ctrl;
- mpm::types::regs_iface::sptr _adc0_ctrl;
- mpm::types::regs_iface::sptr _adc1_ctrl;
- //mpm::types::regs_iface::sptr _phdac_ctrl;
- };
-
-}}; /* namespace mpm::dboards */
-
-#ifdef LIBMPM_PYTHON
-void export_eiscat(){
- LIBMPM_BOOST_PREAMBLE("eiscat")
- using namespace mpm::dboards;
- bp::class_<mpm::dboards::eiscat_manager>("eiscat_manager", bp::init<std::string, std::string, std::string>())
- .def("get_spi_lock", &mpm::dboards::eiscat_manager::get_spi_lock)
- .def("get_clock_ctrl", &mpm::dboards::eiscat_manager::get_clock_ctrl)
- .def("get_adc0_ctrl", &mpm::dboards::eiscat_manager::get_adc0_ctrl)
- .def("get_adc1_ctrl", &mpm::dboards::eiscat_manager::get_adc1_ctrl)
- ;
-}
-#endif
diff --git a/mpm/include/mpm/dboards/magnesium_manager.hpp b/mpm/include/mpm/dboards/magnesium_manager.hpp
index beb5a3cc2..60a38b853 100644
--- a/mpm/include/mpm/dboards/magnesium_manager.hpp
+++ b/mpm/include/mpm/dboards/magnesium_manager.hpp
@@ -28,7 +28,6 @@ namespace mpm { namespace dboards {
{
public:
magnesium_manager(
- const std::string &lmk_spidev,
const std::string &mykonos_spidev
);
@@ -36,10 +35,6 @@ namespace mpm { namespace dboards {
*/
mpm::types::lockable::sptr get_spi_lock() { return _spi_lock; }
- /*! Return a reference to the clock chip controls
- */
- mpm::types::regs_iface::sptr get_clock_ctrl(){ return _clock_ctrl; }
-
/*! Return a reference to the radio chip controls
*/
mpm::chips::ad937x_ctrl::sptr get_radio_ctrl(){ return _mykonos_ctrl; }
@@ -47,10 +42,9 @@ namespace mpm { namespace dboards {
private:
std::shared_ptr<std::mutex> _spi_mutex;
- // TODO: cpld control
+ // TODO: cpld control, or maybe it goes into Python
mpm::types::lockable::sptr _spi_lock;
- mpm::types::regs_iface::sptr _clock_ctrl;
mpm::chips::ad937x_ctrl::sptr _mykonos_ctrl;
};
@@ -60,9 +54,8 @@ namespace mpm { namespace dboards {
void export_magnesium(){
LIBMPM_BOOST_PREAMBLE("dboards")
using namespace mpm::dboards;
- bp::class_<mpm::dboards::magnesium_manager>("magnesium_manager", bp::init<std::string, std::string>())
+ bp::class_<mpm::dboards::magnesium_manager>("magnesium_manager", bp::init<std::string>())
.def("get_spi_lock", &mpm::dboards::magnesium_manager::get_spi_lock)
- .def("get_clock_ctrl", &mpm::dboards::magnesium_manager::get_clock_ctrl)
.def("get_radio_ctrl", &mpm::dboards::magnesium_manager::get_radio_ctrl)
;
}