aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/include
diff options
context:
space:
mode:
Diffstat (limited to 'mpm/include')
-rw-r--r--mpm/include/mpm/spi/adi_ctrl.hpp19
1 files changed, 14 insertions, 5 deletions
diff --git a/mpm/include/mpm/spi/adi_ctrl.hpp b/mpm/include/mpm/spi/adi_ctrl.hpp
index d3269cecc..7cc87b586 100644
--- a/mpm/include/mpm/spi/adi_ctrl.hpp
+++ b/mpm/include/mpm/spi/adi_ctrl.hpp
@@ -17,15 +17,24 @@
#pragma once
-#include <mpm/spi_iface.hpp>
+// TODO: fix path of UHD include
+#include <../../host/include/uhd/types/serial.hpp>
-struct mpm_spiSettings_t
+#include <chrono>
+
+struct ad9371_spiSettings_t
{
- static mpm_spiSettings_t* make(spiSettings_t *sps) {
- return reinterpret_cast<mpm_spiSettings_t *>(sps);
+ static ad9371_spiSettings_t* make(spiSettings_t *sps) {
+ return reinterpret_cast<ad9371_spiSettings_t *>(sps);
}
+ explicit ad9371_spiSettings_t(uhd::spi_iface::sptr uhd_iface);
+
+ // spiSetting_t MUST be the first data member so that the
+ // reintrepret_cast in make() works
spiSettings_t spi_settings;
- mpm::spi_iface *spi_iface;
+ uhd::spi_iface::sptr spi_iface;
+ std::chrono::time_point<std::chrono::steady_clock> timeout_start;
+ std::chrono::microseconds timeout_duration;
};