diff options
author | Brent Stapleton <brent.stapleton@ettus.com> | 2017-11-29 17:05:41 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-12-22 15:05:58 -0800 |
commit | 0bf22a3e57dab4af3bfc66dbae999d3d9d11341b (patch) | |
tree | fd8af6de9c1578124f8cbd5d8c21052786d24913 /mpm/python/usrp_mpm/liberiotable.py | |
parent | 3cff6298cea5f3699aa5db5921cd6933f557a034 (diff) | |
download | uhd-0bf22a3e57dab4af3bfc66dbae999d3d9d11341b.tar.gz uhd-0bf22a3e57dab4af3bfc66dbae999d3d9d11341b.tar.bz2 uhd-0bf22a3e57dab4af3bfc66dbae999d3d9d11341b.zip |
mpm: UIOs now open only when necessary
Refactoring to use the C++-based UIO objects. The Liberio and Ethernet
objects now open the UIO before using it, and close it once done.
Reviewed-By: Martin Braun <martin.braun@ettus.com>
Diffstat (limited to 'mpm/python/usrp_mpm/liberiotable.py')
-rw-r--r-- | mpm/python/usrp_mpm/liberiotable.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mpm/python/usrp_mpm/liberiotable.py b/mpm/python/usrp_mpm/liberiotable.py index be19c7c17..cc848d570 100644 --- a/mpm/python/usrp_mpm/liberiotable.py +++ b/mpm/python/usrp_mpm/liberiotable.py @@ -47,14 +47,14 @@ class LiberioDispatcherTable(object): self.poke32(addr, data) # Poke reg for destination channel try: - poke_and_trace( - 0 + 4 * sid.dst_ep, - dma_channel, - ) + with self._regs.open(): + poke_and_trace( + 0 + 4 * sid.dst_ep, + dma_channel, + ) except Exception as ex: self.log.error( "Unexpected exception while setting route: %s", str(ex), ) raise - |