2017-03-22 02:46:50 +00:00
|
|
|
//
|
2018-02-14 00:37:37 +00:00
|
|
|
// Copyright 2017 Ettus Research, a National Instruments Company
|
2019-02-07 14:34:17 +00:00
|
|
|
// Copyright 2019 Ettus Research, a National Instruments Brand
|
2017-03-22 02:46:50 +00:00
|
|
|
//
|
2018-02-20 00:53:15 +00:00
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
2017-03-22 02:46:50 +00:00
|
|
|
//
|
|
|
|
|
|
2019-02-07 14:34:17 +00:00
|
|
|
#include <pybind11/pybind11.h>
|
2022-04-06 19:00:06 +00:00
|
|
|
#include <pybind11/stl.h>
|
2019-02-07 14:34:17 +00:00
|
|
|
namespace py = pybind11;
|
2017-03-22 02:46:50 +00:00
|
|
|
#define LIBMPM_PYTHON
|
|
|
|
|
|
2019-02-07 14:34:17 +00:00
|
|
|
// 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>);
|
2018-02-14 00:37:37 +00:00
|
|
|
|
2017-04-20 01:53:07 +00:00
|
|
|
#include <mpm/ad937x/ad937x_ctrl.hpp>
|
2017-04-26 00:00:34 +00:00
|
|
|
#include <mpm/dboards/magnesium_manager.hpp>
|
2019-01-14 18:35:25 +00:00
|
|
|
#include <mpm/i2c/i2c_python.hpp>
|
|
|
|
|
#include <mpm/spi/spi_python.hpp>
|
|
|
|
|
#include <mpm/types/types_python.hpp>
|
2017-03-08 17:28:55 +00:00
|
|
|
|
2019-02-07 14:34:17 +00:00
|
|
|
PYBIND11_MODULE(libpyusrp_periphs, m)
|
2017-03-08 17:28:55 +00:00
|
|
|
{
|
2019-02-07 14:34:17 +00:00
|
|
|
export_types(m);
|
|
|
|
|
export_spi(m);
|
|
|
|
|
export_i2c(m);
|
|
|
|
|
export_mykonos(m);
|
|
|
|
|
export_magnesium(m);
|
2017-03-08 17:28:55 +00:00
|
|
|
}
|