aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/python/pyusrp_periphs/x4xx/pyusrp_periphs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mpm/python/pyusrp_periphs/x4xx/pyusrp_periphs.cpp')
-rw-r--r--mpm/python/pyusrp_periphs/x4xx/pyusrp_periphs.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/mpm/python/pyusrp_periphs/x4xx/pyusrp_periphs.cpp b/mpm/python/pyusrp_periphs/x4xx/pyusrp_periphs.cpp
new file mode 100644
index 000000000..31b1ed6c4
--- /dev/null
+++ b/mpm/python/pyusrp_periphs/x4xx/pyusrp_periphs.cpp
@@ -0,0 +1,27 @@
+//
+// 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/i2c/i2c_python.hpp>
+#include <mpm/rfdc/rfdc_ctrl.hpp>
+#include <mpm/spi/spi_python.hpp>
+#include <mpm/types/types_python.hpp>
+
+PYBIND11_MODULE(libpyusrp_periphs, m)
+{
+ export_types(m);
+ export_spi(m);
+ export_i2c(m);
+ export_rfdc(m);
+}