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 /mpm/include | |
parent | 51586a989e118a5b848a95f0c5e8fd274c7cde2b (diff) | |
download | uhd-ae21f9b9d38cb98c91bee84fc4fcf6a81a3e0c0c.tar.gz uhd-ae21f9b9d38cb98c91bee84fc4fcf6a81a3e0c0c.tar.bz2 uhd-ae21f9b9d38cb98c91bee84fc4fcf6a81a3e0c0c.zip |
mpm: fixup for spi and ad937x path changes
Diffstat (limited to 'mpm/include')
-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 |
5 files changed, 3 insertions, 42 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(); -}; |