mirror of
https://github.com/saymrwulf/uhd.git
synced 2026-05-16 21:10:10 +00:00
mpm: Guaranteed stringification of mboard_info values
This commit is contained in:
parent
8b111dd123
commit
c0a528394d
2 changed files with 4 additions and 3 deletions
|
|
@ -262,7 +262,9 @@ class PeriphManagerBase(object):
|
|||
self.log.trace("Found EEPROM metadata: `{}'".format(str(self._eeprom_head)))
|
||||
self.log.trace("Read {} bytes of EEPROM data.".format(len(self._eeprom_rawdata)))
|
||||
for key in ('pid', 'serial', 'rev'):
|
||||
self.mboard_info[key] = self._eeprom_head.get(key, '')
|
||||
# In C++, we can only handle dicts if all the values are of the
|
||||
# same type. So we must convert them all to strings here:
|
||||
self.mboard_info[key] = str(self._eeprom_head.get(key, ''))
|
||||
if self._eeprom_head.has_key('pid') and not self._eeprom_head['pid'] in self.pids:
|
||||
self.log.error("Found invalid PID in EEPROM: 0x{:04X}. Valid PIDs are: {}".format(
|
||||
self._eeprom_head['pid'],
|
||||
|
|
|
|||
|
|
@ -125,11 +125,10 @@ class n310(PeriphManagerBase):
|
|||
self._clock_source = None # Gets set in set_clock_source()
|
||||
self.set_clock_source(N3XX_DEFAULT_CLOCK_SOURCE)
|
||||
|
||||
|
||||
self.mboard_info["serial"] = '123' # some format
|
||||
with open("/sys/class/rfnoc_crossbar/crossbar0/local_addr", "w") as xbar:
|
||||
xbar.write("0x2")
|
||||
# if header.get("dataversion", 0) == 1:
|
||||
self.log.info("mboard info: {}".format(self.mboard_info))
|
||||
|
||||
|
||||
def get_interfaces(self):
|
||||
|
|
|
|||
Loading…
Reference in a new issue