mirror of
https://github.com/EttusResearch/uhd.git
synced 2026-10-25 17:36:10 +00:00
mpm: Implement get_sync_source and get_sync_sources.
This commit is contained in:
parent
8aa73deb5a
commit
5471a1f521
@ -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(),
|
||||
}
|
||||
|
||||
@ -595,6 +595,15 @@ class n3xx(ZynqComponents, PeriphManagerBase):
|
||||
}
|
||||
self.set_sync_source(source)
|
||||
|
||||
def get_sync_sources(self):
|
||||
"""
|
||||
Enumerate permissible time/clock source combinations for sync
|
||||
"""
|
||||
return [{
|
||||
"time_source": time_source,
|
||||
"clock_source": clock_source
|
||||
} for (clock_source, time_source) in self.valid_sync_sources]
|
||||
|
||||
def set_sync_source(self, args):
|
||||
"""
|
||||
Selects reference clock and PPS sources. Unconditionally re-applies the time
|
||||
|
||||
Loading…
Reference in New Issue
Block a user