From 5471a1f521ba98003a06d2674360f70a7a86bdfd Mon Sep 17 00:00:00 2001 From: Lane Kolbly Date: Wed, 13 Jan 2021 16:33:29 -0600 Subject: mpm: Implement get_sync_source and get_sync_sources. --- mpm/python/usrp_mpm/periph_manager/base.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'mpm/python/usrp_mpm/periph_manager/base.py') diff --git a/mpm/python/usrp_mpm/periph_manager/base.py b/mpm/python/usrp_mpm/periph_manager/base.py index c09cde611..324e47dc9 100644 --- a/mpm/python/usrp_mpm/periph_manager/base.py +++ b/mpm/python/usrp_mpm/periph_manager/base.py @@ -978,3 +978,15 @@ class PeriphManagerBase(object): assert src in self.get_gpio_srcs(bank), \ "Invalid GPIO source: {}".format(src) raise NotImplementedError("set_gpio_src() not available on this device!") + + ####################################################################### + # Sync API + ####################################################################### + def get_sync_source(self): + """ + Gets the current time and clock source + """ + return { + "time_source": self.get_time_source(), + "clock_source": self.get_clock_source(), + } -- cgit v1.2.3