aboutsummaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/features/discoverable_feature.hpp1
-rw-r--r--host/include/uhd/features/trig_io_mode_iface.hpp40
-rw-r--r--host/include/uhd/types/trig_io_mode.hpp20
3 files changed, 61 insertions, 0 deletions
diff --git a/host/include/uhd/features/discoverable_feature.hpp b/host/include/uhd/features/discoverable_feature.hpp
index 8cbe8e13f..b1a03eaea 100644
--- a/host/include/uhd/features/discoverable_feature.hpp
+++ b/host/include/uhd/features/discoverable_feature.hpp
@@ -34,6 +34,7 @@ public:
FPGA_LOAD_NOTIFICATION,
ADC_SELF_CALIBRATION,
REF_CLK_CALIBRATION,
+ TRIG_IO_MODE,
};
virtual ~discoverable_feature() = default;
diff --git a/host/include/uhd/features/trig_io_mode_iface.hpp b/host/include/uhd/features/trig_io_mode_iface.hpp
new file mode 100644
index 000000000..53b0ff19f
--- /dev/null
+++ b/host/include/uhd/features/trig_io_mode_iface.hpp
@@ -0,0 +1,40 @@
+//
+// Copyright 2021 Ettus Research, a National Instruments Brand
+//
+// SPDX-License-Identifier: GPL-3.0-or-later
+//
+
+#pragma once
+
+#include <uhd/features/discoverable_feature.hpp>
+#include <uhd/types/trig_io_mode.hpp>
+#include <memory>
+#include <string>
+
+namespace uhd { namespace features {
+
+/*! Interface to provide access to set the mode of the Trig In/Out port.
+ * Currently, only the X4xx series of devices supports this.
+ */
+class trig_io_mode_iface : public discoverable_feature
+{
+public:
+ using sptr = std::shared_ptr<trig_io_mode_iface>;
+
+ static discoverable_feature::feature_id_t get_feature_id()
+ {
+ return discoverable_feature::TRIG_IO_MODE;
+ }
+
+ std::string get_feature_name() const
+ {
+ return "Trig IO Mode";
+ }
+
+ virtual ~trig_io_mode_iface() = default;
+
+ //! Set the mode for the trig i/o port
+ virtual void set_trig_io_mode(const uhd::trig_io_mode_t mode) = 0;
+};
+
+}} // namespace uhd::features
diff --git a/host/include/uhd/types/trig_io_mode.hpp b/host/include/uhd/types/trig_io_mode.hpp
new file mode 100644
index 000000000..13053e926
--- /dev/null
+++ b/host/include/uhd/types/trig_io_mode.hpp
@@ -0,0 +1,20 @@
+//
+// Copyright 2021 Ettus Research, a National Instruments Brand
+//
+// SPDX-License-Identifier: GPL-3.0-or-later
+//
+
+#pragma once
+
+namespace uhd {
+
+enum class trig_io_mode_t {
+ //! Output PPS signal from port
+ PPS_OUTPUT,
+ //! Use port as input
+ INPUT,
+ //! Port is turned off
+ OFF
+};
+
+} // namespace uhd