diff options
Diffstat (limited to 'mpm')
-rw-r--r-- | mpm/include/mpm/ad937x/ad937x_ctrl.hpp | 3 | ||||
-rw-r--r-- | mpm/include/mpm/dboards/magnesium_manager.hpp | 3 | ||||
-rw-r--r-- | mpm/include/mpm/spi/CMakeLists.txt | 4 | ||||
-rw-r--r-- | mpm/include/mpm/spi/mock_spi.h | 10 | ||||
-rw-r--r-- | mpm/include/mpm/spi/spi_lock.hpp | 25 | ||||
-rw-r--r-- | mpm/lib/mykonos/ad937x_ctrl.cpp | 2 | ||||
-rw-r--r-- | mpm/lib/mykonos/ad937x_device.hpp | 2 | ||||
-rw-r--r-- | mpm/lib/mykonos/adi_ctrl.cpp | 2 | ||||
-rw-r--r-- | mpm/python/pyusrp_periphs.cpp | 2 |
9 files changed, 7 insertions, 46 deletions
diff --git a/mpm/include/mpm/ad937x/ad937x_ctrl.hpp b/mpm/include/mpm/ad937x/ad937x_ctrl.hpp index 43ed37a94..aeb550f00 100644 --- a/mpm/include/mpm/ad937x/ad937x_ctrl.hpp +++ b/mpm/include/mpm/ad937x/ad937x_ctrl.hpp @@ -17,8 +17,6 @@ #pragma once -#include "mpm/spi/spi_lock.hpp" - #include <uhd/types/direction.hpp> #include <uhd/types/ranges.hpp> #include <uhd/exception.hpp> @@ -28,6 +26,7 @@ #include <memory> #include <functional> #include <set> +#include <mutex> class ad937x_ctrl : public boost::noncopyable { diff --git a/mpm/include/mpm/dboards/magnesium_manager.hpp b/mpm/include/mpm/dboards/magnesium_manager.hpp index be8f9f8e8..34c81292e 100644 --- a/mpm/include/mpm/dboards/magnesium_manager.hpp +++ b/mpm/include/mpm/dboards/magnesium_manager.hpp @@ -17,10 +17,9 @@ #pragma once -#include "mpm/spi/spi_lock.hpp" #include "mpm/spi/spidev_iface.hpp" #include "mpm/lmk04828/lmk04828_spi_iface.hpp" -#include "mpm/mykonos/ad937x_ctrl.hpp" +#include "mpm/ad937x/ad937x_ctrl.hpp" #include <memory> namespace mpm { namespace dboards { diff --git a/mpm/include/mpm/spi/CMakeLists.txt b/mpm/include/mpm/spi/CMakeLists.txt index 7aa3de791..0833764ff 100644 --- a/mpm/include/mpm/spi/CMakeLists.txt +++ b/mpm/include/mpm/spi/CMakeLists.txt @@ -14,10 +14,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # + INSTALL(FILES - adi_ctrl.hpp - mock_spi.h spidev_iface.hpp - spi_lock.hpp DESTINATION ${INCLUDE_DIR}/mpm/spi ) diff --git a/mpm/include/mpm/spi/mock_spi.h b/mpm/include/mpm/spi/mock_spi.h deleted file mode 100644 index c289faa16..000000000 --- a/mpm/include/mpm/spi/mock_spi.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -#include <uhd/types/serial.hpp> - -class mock_spi : public virtual uhd::spi_iface -{ -public: - typedef boost::shared_ptr<spi> sptr; - static sptr make(const std::string &device); -}; diff --git a/mpm/include/mpm/spi/spi_lock.hpp b/mpm/include/mpm/spi/spi_lock.hpp deleted file mode 100644 index 9ad4e20fe..000000000 --- a/mpm/include/mpm/spi/spi_lock.hpp +++ /dev/null @@ -1,25 +0,0 @@ -#pragma once - -#include <boost/noncopyable.hpp> -#include <mutex> -#include <memory> - -class spi_lock : public boost::noncopyable -{ -public: - using sptr = std::shared_ptr<spi_lock>; - static sptr make(uint8_t spidev_index); - - spi_lock(uint8_t spidev_index); - - uint8_t get_spidev() const; - -private: - const uint8_t spidev_index; - - // BasicLockable implementation for lock_guard - mutable std::mutex spi_mutex; - friend class std::lock_guard<spi_lock>; - void lock(); - void unlock(); -}; diff --git a/mpm/lib/mykonos/ad937x_ctrl.cpp b/mpm/lib/mykonos/ad937x_ctrl.cpp index b0777091f..ce98706fa 100644 --- a/mpm/lib/mykonos/ad937x_ctrl.cpp +++ b/mpm/lib/mykonos/ad937x_ctrl.cpp @@ -18,7 +18,7 @@ #include "ad937x_device.hpp" #include "adi/mykonos.h" -#include <mpm/mykonos/ad937x_ctrl.hpp> +#include <mpm/ad937x/ad937x_ctrl.hpp> #include <sstream> #include <set> diff --git a/mpm/lib/mykonos/ad937x_device.hpp b/mpm/lib/mykonos/ad937x_device.hpp index f3b192a01..59872b073 100644 --- a/mpm/lib/mykonos/ad937x_device.hpp +++ b/mpm/lib/mykonos/ad937x_device.hpp @@ -21,7 +21,7 @@ #include "config/ad937x_fir.hpp" #include "adi/t_mykonos.h" #include "adi/t_mykonos_gpio.h" -#include "mpm/spi/adi_ctrl.hpp" +#include "mpm/ad937x/adi_ctrl.hpp" #include <uhd/types/direction.hpp> #include <uhd/types/ranges.hpp> diff --git a/mpm/lib/mykonos/adi_ctrl.cpp b/mpm/lib/mykonos/adi_ctrl.cpp index 287d17f5f..c7fcceaa9 100644 --- a/mpm/lib/mykonos/adi_ctrl.cpp +++ b/mpm/lib/mykonos/adi_ctrl.cpp @@ -17,7 +17,7 @@ #include "adi/common.h" -#include <mpm/spi/adi_ctrl.hpp> +#include <mpm/ad937x/adi_ctrl.hpp> #include <uhd/exception.hpp> #include <iostream> diff --git a/mpm/python/pyusrp_periphs.cpp b/mpm/python/pyusrp_periphs.cpp index 397fab06a..b111e40ca 100644 --- a/mpm/python/pyusrp_periphs.cpp +++ b/mpm/python/pyusrp_periphs.cpp @@ -30,7 +30,7 @@ #include "mpm/net_helper.hpp" #include "mpm/xbar_iface.hpp" #include "mpm/udev_helper.hpp" -#include "mpm/mykonos/ad937x_ctrl.hpp" +#include "mpm/ad937x/ad937x_ctrl.hpp" #include "mpm/lmk04828//lmk04828_spi_iface.hpp" //#include "lib_periphs.hpp" //#include "dboards.hpp" |