diff options
author | Martin Anderseck <martin.anderseck@ni.com> | 2021-12-15 16:27:23 +0100 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2022-01-13 14:35:55 -0600 |
commit | ee8e4f2c9b1bae8085dff6199c2bade0914748f7 (patch) | |
tree | cf3ad50af9318a1556e4425b9389e760833fbc38 /host/lib/usrp/x400/x400_gpio_control.hpp | |
parent | 6bb7d61251abd303049dfd0f47bd0266656797fb (diff) | |
download | uhd-ee8e4f2c9b1bae8085dff6199c2bade0914748f7.tar.gz uhd-ee8e4f2c9b1bae8085dff6199c2bade0914748f7.tar.bz2 uhd-ee8e4f2c9b1bae8085dff6199c2bade0914748f7.zip |
SPI: Implement SPI engine for x410
Add SPI Core host implementation for x410 and a discoverable
feature to make it accessible.
Diffstat (limited to 'host/lib/usrp/x400/x400_gpio_control.hpp')
-rw-r--r-- | host/lib/usrp/x400/x400_gpio_control.hpp | 17 |
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 |