aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/lib/mykonos
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2017-04-25 18:45:15 -0700
committerMartin Braun <martin.braun@ettus.com>2017-12-22 15:03:52 -0800
commitcf6619992ac0d9ed2d2c99ab17a98023ee162fef (patch)
tree13f2bee9499017fe3138297846093d32ae2f4152 /mpm/lib/mykonos
parent151ba5fb06dfdb6fcc46ccfdabf5f1e064236981 (diff)
downloaduhd-cf6619992ac0d9ed2d2c99ab17a98023ee162fef.tar.gz
uhd-cf6619992ac0d9ed2d2c99ab17a98023ee162fef.tar.bz2
uhd-cf6619992ac0d9ed2d2c99ab17a98023ee162fef.zip
mpm: Added peek/poke interface to ad937x_ctrl
Diffstat (limited to 'mpm/lib/mykonos')
-rw-r--r--mpm/lib/mykonos/ad937x_ctrl.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/mpm/lib/mykonos/ad937x_ctrl.cpp b/mpm/lib/mykonos/ad937x_ctrl.cpp
index 69ffeb6c2..6bd8b5ce1 100644
--- a/mpm/lib/mykonos/ad937x_ctrl.cpp
+++ b/mpm/lib/mykonos/ad937x_ctrl.cpp
@@ -381,6 +381,18 @@ public:
device.set_gain_pin_step_sizes(dir, chain, inc_step, dec_step);
}
+ uint8_t peek8(const uint32_t addr)
+ {
+ std::lock_guard<std::mutex> lock(*spi_mutex);
+ return _iface->peek8(addr);
+ }
+
+ void poke8(const uint32_t addr, const uint8_t val)
+ {
+ std::lock_guard<std::mutex> lock(*spi_mutex);
+ _iface->poke8(addr, val);
+ }
+
private:
ad937x_device device;
std::shared_ptr<std::mutex> spi_mutex;