From 5b18614d39f5cebdd8bf3bf6e5acf3a34f204191 Mon Sep 17 00:00:00 2001 From: Brent Stapleton Date: Fri, 20 Jul 2018 16:07:38 -0700 Subject: uio: mpm: Fixup for opening mboard-regs UIO - Fix the syntax to open mboard-regs UIO objects, and change the open() and close() functions to be private. - We were calling open() twice in every context manager line- once manually, and once in __enter__. This commit corrects those usages, and allows the context manager to fully manage the opening and closing of UIO objects. --- mpm/python/usrp_mpm/cores/white_rabbit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mpm/python/usrp_mpm/cores') diff --git a/mpm/python/usrp_mpm/cores/white_rabbit.py b/mpm/python/usrp_mpm/cores/white_rabbit.py index c30c325e9..eeeb5fd31 100644 --- a/mpm/python/usrp_mpm/cores/white_rabbit.py +++ b/mpm/python/usrp_mpm/cores/white_rabbit.py @@ -45,7 +45,7 @@ class WhiteRabbitRegsControl(object): """ Retrieves and decodes the lock status for the PPS out of the WR core. """ - with self.regs.open(): + with self.regs: ext_sync_status = self.periph_peek32(self.PPSG_ESCR) # bit 2: PPS_VALID # bit 3: TM_VALID (timecode) -- cgit v1.2.3