aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/device_python.cpp19
-rw-r--r--host/lib/device_python.hpp9
2 files changed, 28 insertions, 0 deletions
diff --git a/host/lib/device_python.cpp b/host/lib/device_python.cpp
new file mode 100644
index 000000000..43147a09c
--- /dev/null
+++ b/host/lib/device_python.cpp
@@ -0,0 +1,19 @@
+//
+// Copyright 2020 Ettus Research, a National Instruments Brand
+//
+// SPDX-License-Identifier: GPL-3.0-or-later
+//
+
+#include <pybind11/complex.h>
+#include <pybind11/pybind11.h>
+#include <pybind11/stl.h>
+
+namespace py = pybind11;
+
+#include "device_python.hpp"
+#include <uhd/device.hpp>
+
+void export_device(py::module& m)
+{
+ m.def("find", [](const uhd::device_addr_t& hint) { return uhd::device::find(hint); });
+}
diff --git a/host/lib/device_python.hpp b/host/lib/device_python.hpp
new file mode 100644
index 000000000..1cc0445cd
--- /dev/null
+++ b/host/lib/device_python.hpp
@@ -0,0 +1,9 @@
+//
+// Copyright 2020 Ettus Research, a National Instruments Brand
+//
+// SPDX-License-Identifier: GPL-3.0-or-later
+//
+
+#pragma once
+
+void export_device(py::module& m);