aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/x400/x400_gpio_control.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/usrp/x400/x400_gpio_control.hpp')
-rw-r--r--host/lib/usrp/x400/x400_gpio_control.hpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/host/lib/usrp/x400/x400_gpio_control.hpp b/host/lib/usrp/x400/x400_gpio_control.hpp
index a0c0593ec..01cfc134e 100644
--- a/host/lib/usrp/x400/x400_gpio_control.hpp
+++ b/host/lib/usrp/x400/x400_gpio_control.hpp
@@ -6,8 +6,9 @@
#pragma once
-#include <uhdlib/usrp/cores/gpio_atr_3000.hpp>
#include <uhdlib/usrp/common/rpc.hpp>
+#include <uhdlib/usrp/cores/gpio_atr_3000.hpp>
+#include <uhdlib/usrp/cores/gpio_port_mapper.hpp>
#include <vector>
namespace uhd { namespace rfnoc { namespace x400 {
@@ -32,7 +33,8 @@ extern const char* GPIO_BANK_NAME;
* internal radio control registers, as well as in MPM to configure the DIO
* board.
*/
-class gpio_control {
+class gpio_control
+{
public:
using sptr = std::shared_ptr<gpio_control>;
@@ -79,4 +81,13 @@ private:
std::vector<usrp::gpio_atr::gpio_atr_3000::sptr> _gpios;
};
-}}} // namespace uhd::rfnoc::x400
+class x400_gpio_port_mapping : public uhd::mapper::gpio_port_mapper
+{
+public:
+ x400_gpio_port_mapping(){};
+
+ uint32_t map_value(const uint32_t& value) override;
+
+ uint32_t unmap_value(const uint32_t& value) override;
+};
+}}} // namespace uhd::rfnoc::x400 \ No newline at end of file