aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorLane Kolbly <lane.kolbly@ni.com>2021-10-15 12:45:10 -0500
committerAaron Rossetto <aaron.rossetto@ni.com>2021-11-03 06:04:19 -0700
commit3162b92bedda20f5b376137f5e918ebe07406fbb (patch)
tree0cd75641bcd6d4c87af1689e12889917ad444cfb /host
parent78336d4f6f08c3272a3d5dd5b478b5dfbc1345f2 (diff)
downloaduhd-3162b92bedda20f5b376137f5e918ebe07406fbb.tar.gz
uhd-3162b92bedda20f5b376137f5e918ebe07406fbb.tar.bz2
uhd-3162b92bedda20f5b376137f5e918ebe07406fbb.zip
host: Add GPIO functions to MPM RPC shim
Diffstat (limited to 'host')
-rw-r--r--host/lib/include/uhdlib/usrp/common/rpc.py5
-rw-r--r--host/tests/rfnoc_block_tests/x4xx_zbx_mpm_mock.hpp15
2 files changed, 20 insertions, 0 deletions
diff --git a/host/lib/include/uhdlib/usrp/common/rpc.py b/host/lib/include/uhdlib/usrp/common/rpc.py
index 4ca30b07d..bef658921 100644
--- a/host/lib/include/uhdlib/usrp/common/rpc.py
+++ b/host/lib/include/uhdlib/usrp/common/rpc.py
@@ -87,6 +87,11 @@ IFACES = [
fn_from_string("double get_spll_freq()"),
fn_from_string("void setup_threshold(size_t db_number, size_t chan, size_t threshold_block, const std::string& mode, size_t delay, size_t under, size_t over)"),
fn_from_string("bool is_db_gpio_ifc_present(size_t db_idx)"),
+
+ # Digital I/O functions
+ 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)"),
]),
Interface("dboard_base_rpc", [
fn_from_string("std::vector<std::string> get_sensors(const std::string& trx)"),
diff --git a/host/tests/rfnoc_block_tests/x4xx_zbx_mpm_mock.hpp b/host/tests/rfnoc_block_tests/x4xx_zbx_mpm_mock.hpp
index 956e713db..cd4f71c2f 100644
--- a/host/tests/rfnoc_block_tests/x4xx_zbx_mpm_mock.hpp
+++ b/host/tests/rfnoc_block_tests/x4xx_zbx_mpm_mock.hpp
@@ -315,6 +315,21 @@ public:
// nop
}
+ void dio_set_voltage_level(const std::string&, const std::string&) override
+ {
+ // nop
+ }
+
+ void dio_set_port_mapping(const std::string&) override
+ {
+ // nop
+ }
+
+ void dio_set_pin_directions(const std::string&, uint32_t) override
+ {
+ // nop
+ }
+
///////////////////////////////////////////////////////////////////////////
// Public attributes for easy inspection
//