diff options
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(); -}; |