From 1ba8c2517d7162e0a5df1006abffcfc0ca910394 Mon Sep 17 00:00:00 2001 From: Lane Kolbly Date: Fri, 18 Mar 2022 15:41:55 -0500 Subject: host: x410: Cache GPIO source in mb_controller --- host/lib/include/uhdlib/usrp/common/mpmd_mb_controller.hpp | 3 +++ host/lib/include/uhdlib/usrp/common/rpc.py | 3 +++ 2 files changed, 6 insertions(+) (limited to 'host/lib/include/uhdlib') diff --git a/host/lib/include/uhdlib/usrp/common/mpmd_mb_controller.hpp b/host/lib/include/uhdlib/usrp/common/mpmd_mb_controller.hpp index f4f6e0ba7..fffa85628 100644 --- a/host/lib/include/uhdlib/usrp/common/mpmd_mb_controller.hpp +++ b/host/lib/include/uhdlib/usrp/common/mpmd_mb_controller.hpp @@ -123,6 +123,9 @@ private: std::vector _gpio_banks; std::unordered_map> _gpio_srcs; + //! Cache of currently set GPIO sources + std::unordered_map> _current_gpio_src; + std::vector _sync_source_updaters; public: diff --git a/host/lib/include/uhdlib/usrp/common/rpc.py b/host/lib/include/uhdlib/usrp/common/rpc.py index b33ec773b..f51d2796d 100644 --- a/host/lib/include/uhdlib/usrp/common/rpc.py +++ b/host/lib/include/uhdlib/usrp/common/rpc.py @@ -92,6 +92,9 @@ IFACES = [ fn_from_string("void dio_set_voltage_level(const std::string& port, const std::string& level)"), fn_from_string("void dio_set_port_mapping(const std::string& mapping)"), fn_from_string("void dio_set_pin_directions(const std::string& port, uint32_t values)"), + + # GPIO + fn_from_string("std::vector get_gpio_src(const std::string& bank)"), ]), Interface("dio_rpc", [ fn_from_string("std::vector dio_get_supported_voltage_levels(const std::string& port)"), -- cgit v1.2.3