diff options
author | Martin Braun <martin.braun@ettus.com> | 2017-03-23 15:40:28 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-12-22 15:03:44 -0800 |
commit | 6d332e5ca4a7311406ac285f827c31c9e5b94280 (patch) | |
tree | 77098d97db8e8884124d66617721724821a80ced /mpm/lib/spi | |
parent | ef6326a174e6880be5e2eaeac26a2c5de0768807 (diff) | |
download | uhd-6d332e5ca4a7311406ac285f827c31c9e5b94280.tar.gz uhd-6d332e5ca4a7311406ac285f827c31c9e5b94280.tar.bz2 uhd-6d332e5ca4a7311406ac285f827c31c9e5b94280.zip |
mpm: move public includes into include/
Diffstat (limited to 'mpm/lib/spi')
-rw-r--r-- | mpm/lib/spi/mock_spi.h | 10 | ||||
-rw-r--r-- | mpm/lib/spi/spi_lock.cpp | 2 | ||||
-rw-r--r-- | mpm/lib/spi/spi_lock.h | 25 |
3 files changed, 1 insertions, 36 deletions
diff --git a/mpm/lib/spi/mock_spi.h b/mpm/lib/spi/mock_spi.h deleted file mode 100644 index c289faa16..000000000 --- a/mpm/lib/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/lib/spi/spi_lock.cpp b/mpm/lib/spi/spi_lock.cpp index 5077053e7..b37daa738 100644 --- a/mpm/lib/spi/spi_lock.cpp +++ b/mpm/lib/spi/spi_lock.cpp @@ -1,4 +1,4 @@ -#include "spi_lock.h" +#include "mpm/spi/spi_lock.hpp" spi_lock::spi_lock(uint8_t spidev_index) : spidev_index(spidev_index) diff --git a/mpm/lib/spi/spi_lock.h b/mpm/lib/spi/spi_lock.h deleted file mode 100644 index 9ad4e20fe..000000000 --- a/mpm/lib/spi/spi_lock.h +++ /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(); -}; |