diff options
author | Mark Meserve <mark.meserve@ni.com> | 2017-03-29 17:23:32 -0500 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-12-22 15:03:45 -0800 |
commit | ae21f9b9d38cb98c91bee84fc4fcf6a81a3e0c0c (patch) | |
tree | e2a286fb6ae5dc74a29dbc62c0947b614861c766 | |
parent | 51586a989e118a5b848a95f0c5e8fd274c7cde2b (diff) | |
download | uhd-ae21f9b9d38cb98c91bee84fc4fcf6a81a3e0c0c.tar.gz uhd-ae21f9b9d38cb98c91bee84fc4fcf6a81a3e0c0c.tar.bz2 uhd-ae21f9b9d38cb98c91bee84fc4fcf6a81a3e0c0c.zip |
mpm: fixup for spi and ad937x path changes
-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" |