aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/python/pyusrp_periphs
diff options
context:
space:
mode:
authorSugandha Gupta <sugandha.gupta@ettus.com>2019-01-25 11:34:47 -0800
committerBrent Stapleton <brent.stapleton@ettus.com>2019-05-01 15:17:23 -0700
commit178b35569b1a25180a80a23b945b10b04c9f10f5 (patch)
tree3adb6f78ebd148867a50526c60fe7bf9694a4a72 /mpm/python/pyusrp_periphs
parent8a400f6a30942c9d6d3596f6989720eb4cff058b (diff)
downloaduhd-178b35569b1a25180a80a23b945b10b04c9f10f5.tar.gz
uhd-178b35569b1a25180a80a23b945b10b04c9f10f5.tar.bz2
uhd-178b35569b1a25180a80a23b945b10b04c9f10f5.zip
e310/e320: Move E310 to MPM architecture and refactor
- Turns the E310 into an MPM device (like N3xx, E320) - Factor out common code between E320 and E310, maximize sharing between the two devices - Remove all pre-MPM E310 code that is no longer needed - Modify MPM to remove all existing overlays before applying new ones (this is necessary to enable idle image mode for E310) Co-authored-by: Virendra Kakade <virendra.kakade@ni.com> Signed-off-by: Virendra Kakade <virendra.kakade@ni.com>
Diffstat (limited to 'mpm/python/pyusrp_periphs')
-rw-r--r--mpm/python/pyusrp_periphs/e31x/pyusrp_periphs.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/mpm/python/pyusrp_periphs/e31x/pyusrp_periphs.cpp b/mpm/python/pyusrp_periphs/e31x/pyusrp_periphs.cpp
new file mode 100644
index 000000000..b7971407c
--- /dev/null
+++ b/mpm/python/pyusrp_periphs/e31x/pyusrp_periphs.cpp
@@ -0,0 +1,30 @@
+//
+// Copyright 2018 Ettus Research, a National Instruments Company
+// Copyright 2019 Ettus Research, a National Instruments Brand
+//
+// SPDX-License-Identifier: GPL-3.0-or-later
+//
+
+#include <pybind11/pybind11.h>
+namespace py = pybind11;
+#define LIBMPM_PYTHON
+
+// Allow boost::shared_ptr<T> to be a holder class of an object (PyBind11
+// supports std::shared_ptr and std::unique_ptr out of the box)
+#include <boost/shared_ptr.hpp>
+PYBIND11_DECLARE_HOLDER_TYPE(T, boost::shared_ptr<T>);
+
+#include <mpm/ad9361/ad9361_ctrl.hpp>
+#include <mpm/dboards/e31x_db_manager.hpp>
+#include <mpm/spi/spi_python.hpp>
+#include <mpm/types/types_python.hpp>
+#include <mpm/xbar_iface.hpp>
+
+PYBIND11_MODULE(libpyusrp_periphs, m)
+{
+ export_types(m);
+ export_spi(m);
+ export_xbar(m);
+ export_catalina(m);
+ export_e31x_db(m);
+}