From 4dd85b0389bc8019a7501ce0e6e87981f6f34f43 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Tue, 9 May 2017 10:41:15 -0700 Subject: rfnoc radio: Made GPIO functions not pure virtual Default implementations simply throw an exception. Makes it easier to write new radio controls that do not implement GPIO features. --- host/lib/rfnoc/radio_ctrl_impl.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'host/lib/rfnoc/radio_ctrl_impl.cpp') diff --git a/host/lib/rfnoc/radio_ctrl_impl.cpp b/host/lib/rfnoc/radio_ctrl_impl.cpp index 5504efbb0..69c9fb68c 100644 --- a/host/lib/rfnoc/radio_ctrl_impl.cpp +++ b/host/lib/rfnoc/radio_ctrl_impl.cpp @@ -450,3 +450,22 @@ std::vector radio_ctrl_impl::get_clock_sources() return _tree->access>("clock_source/options").get(); } + +std::vector radio_ctrl_impl::get_gpio_banks() const +{ + return std::vector(); +} + +void radio_ctrl_impl::set_gpio_attr( + const std::string &bank, + const std::string &attr, + const uint32_t value, + const uint32_t mask +) { + throw uhd::not_implemented_error("set_gpio_attr was not defined for this radio"); +} + +uint32_t radio_ctrl_impl::get_gpio_attr(const std::string &bank, const std::string &attr) +{ + throw uhd::not_implemented_error("get_gpio_attr was not defined for this radio"); +} -- cgit v1.2.3