aboutsummaryrefslogtreecommitdiffstats
path: root/mpm
diff options
context:
space:
mode:
authorDerek Kozel <derek.kozel@ettus.com>2017-04-18 16:04:27 +0100
committerMartin Braun <martin.braun@ettus.com>2017-12-22 15:03:45 -0800
commitf2f1204ea47865cf16e2a27fb3e004baedbb82f8 (patch)
tree6c3e52681efb86f22f09b66e0b5b1e299d837804 /mpm
parent5a3abf352cfa3f3c387d9ff8e98525811c478fb8 (diff)
downloaduhd-f2f1204ea47865cf16e2a27fb3e004baedbb82f8.tar.gz
uhd-f2f1204ea47865cf16e2a27fb3e004baedbb82f8.tar.bz2
uhd-f2f1204ea47865cf16e2a27fb3e004baedbb82f8.zip
lmk: Update LMK04828 driver with values for Magnesium
Diffstat (limited to 'mpm')
-rw-r--r--mpm/dboards/magnesium_manager.cpp2
-rw-r--r--mpm/include/mpm/lmk04828/lmk04828_spi_iface.hpp2
-rw-r--r--mpm/python/lmk02848_py.hpp13
-rw-r--r--mpm/python/pyusrp_periphs.cpp1
4 files changed, 16 insertions, 2 deletions
diff --git a/mpm/dboards/magnesium_manager.cpp b/mpm/dboards/magnesium_manager.cpp
index 8639a7ff1..adbac5918 100644
--- a/mpm/dboards/magnesium_manager.cpp
+++ b/mpm/dboards/magnesium_manager.cpp
@@ -26,7 +26,7 @@ magnesium_periph_manager::magnesium_periph_manager(
): _spi_mutex(std::make_shared<std::mutex>())
{
_clock_spi = lmk04828_spi_iface::make(mpm::spi::spidev_iface::make(lmk_spidev));
- _clock_ctrl = lmk04828_iface::make(_clock_spi->get_write_fn(), _clock_spi->get_read_fn());
+ _clock_ctrl = boost::make_shared<lmk04828_iface>(lmk04828_iface(_clock_spi->get_write_fn(), _clock_spi->get_read_fn()));
_mykonos_spi = mpm::spi::spidev_iface::make(mykonos_spidev);
_mykonos_ctrl = ad937x_ctrl::make(_spi_mutex, _mykonos_spi, mpm::ad937x::gpio::gain_pins_t());
};
diff --git a/mpm/include/mpm/lmk04828/lmk04828_spi_iface.hpp b/mpm/include/mpm/lmk04828/lmk04828_spi_iface.hpp
index 2743977dc..af068c9e0 100644
--- a/mpm/include/mpm/lmk04828/lmk04828_spi_iface.hpp
+++ b/mpm/include/mpm/lmk04828/lmk04828_spi_iface.hpp
@@ -32,11 +32,11 @@ private:
void export_lmk(){
LIBMPM_BOOST_PREAMBLE("lmk04828")
bp::class_<lmk04828_iface, boost::shared_ptr<lmk04828_iface>, boost::noncopyable >("lmk04828_iface", bp::no_init)
- .def("make", &lmk04828_iface::make)
.def("verify_chip_id", &lmk04828_iface::verify_chip_id)
.def("get_chip_id", &lmk04828_iface::get_chip_id)
.def("init", &lmk04828_iface::init)
.def("send_sysref_pulse", &lmk04828_iface::send_sysref_pulse)
;
}
+// .def("make", &lmk04828_iface::make)
#endif
diff --git a/mpm/python/lmk02848_py.hpp b/mpm/python/lmk02848_py.hpp
new file mode 100644
index 000000000..5b0b89a1c
--- /dev/null
+++ b/mpm/python/lmk02848_py.hpp
@@ -0,0 +1,13 @@
+#include "../../host/lib/usrp/common/lmk04828.hpp"
+
+#ifdef LIBMPM_PYTHON
+void export_(){
+ LIBMPM_BOOST_PREAMBLE("lmk04828")
+ bp::class_<lmk04828_iface>("lmk04828", bp::init<lmk04828_iface::write_fn_t, lmk04828_iface::read_fn_t>())
+ .def("verify_chip_id", &lmk04828_iface::verify_chip_id)
+ .def("get_chip_id", &lmk04828_iface::get_chip_id)
+ .def("init", &lmk04828_iface::init)
+ .def("send_sysref_pulse", &lmk04828_iface::send_sysref_pulse)
+ ;
+}
+#endif
diff --git a/mpm/python/pyusrp_periphs.cpp b/mpm/python/pyusrp_periphs.cpp
index 9f6378763..77d358eca 100644
--- a/mpm/python/pyusrp_periphs.cpp
+++ b/mpm/python/pyusrp_periphs.cpp
@@ -31,6 +31,7 @@
#include "mpm/ad937x/ad937x_ctrl.hpp"
#include "mpm/lmk04828//lmk04828_spi_iface.hpp"
#include "mpm/dboards/magnesium_manager.hpp"
+#include "lmk02848_py.hpp"
//#include "lib_periphs.hpp"
//#include "dboards.hpp"
#include <boost/noncopyable.hpp>