From 90a72e8cd4cd1d4971c0e09d9813c9fc43371062 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Thu, 14 Nov 2019 13:17:25 -0800 Subject: multi_usrp: Amend APIs for GPIO source control This adds a new API call to multi_usrp: get_gpio_src_banks(). This returns a list of GPIO banks who's source can be controlled through the motherboard controller. The remaining GPIO source methods' docstrings are improved, to explain the difference between GPIO banks for set_gpio_attr() and set_gpio_src(). The former controls the actual value on a GPIO bank, and the latter who drives it. These can be different banks. --- host/lib/usrp/multi_usrp_rfnoc.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'host/lib/usrp/multi_usrp_rfnoc.cpp') diff --git a/host/lib/usrp/multi_usrp_rfnoc.cpp b/host/lib/usrp/multi_usrp_rfnoc.cpp index 99c07dc8c..b2070c53d 100644 --- a/host/lib/usrp/multi_usrp_rfnoc.cpp +++ b/host/lib/usrp/multi_usrp_rfnoc.cpp @@ -1956,6 +1956,11 @@ public: return radio_bank_pair.first->get_gpio_attr(radio_bank_pair.second, attr); } + std::vector get_gpio_src_banks(const size_t mboard) + { + return get_mbc(mboard)->get_gpio_banks(); + } + std::vector get_gpio_srcs(const std::string& bank, const size_t mboard) { return get_mbc(mboard)->get_gpio_srcs(bank); -- cgit v1.2.3