diff options
author | Martin Braun <martin.braun@ettus.com> | 2017-05-12 14:27:59 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-12-22 15:03:53 -0800 |
commit | 9dee6175da45440997c8ed82fbf40f8f380dc4a7 (patch) | |
tree | ad791488d217c76f9187b318f026872f419939d5 /mpm/python/usrp_mpm/dboard_manager/magnesium.py | |
parent | ca1723c02ea3d30f1003840f6fc1350e39c97485 (diff) | |
download | uhd-9dee6175da45440997c8ed82fbf40f8f380dc4a7.tar.gz uhd-9dee6175da45440997c8ed82fbf40f8f380dc4a7.tar.bz2 uhd-9dee6175da45440997c8ed82fbf40f8f380dc4a7.zip |
mpm: Moved device and dboard init/deinit to their own methods
Also cleaned up some cruft.
Diffstat (limited to 'mpm/python/usrp_mpm/dboard_manager/magnesium.py')
-rw-r--r-- | mpm/python/usrp_mpm/dboard_manager/magnesium.py | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/mpm/python/usrp_mpm/dboard_manager/magnesium.py b/mpm/python/usrp_mpm/dboard_manager/magnesium.py index edb9a24db..9edfe497c 100644 --- a/mpm/python/usrp_mpm/dboard_manager/magnesium.py +++ b/mpm/python/usrp_mpm/dboard_manager/magnesium.py @@ -65,12 +65,14 @@ class Magnesium(DboardManagerBase): def __init__(self, slot_idx, **kwargs): super(Magnesium, self).__init__(*args, **kwargs) self.log = get_logger("Magnesium") - # eeprom_data is a tuple (head_dict, raw_data) - def init_device(self): + def init(self, args): """ Execute necessary init dance to bring up dboard """ + self.log.info("init() called with args `{}'".format( + ",".join(['{}={}'.format(x, args[x]) for x in args]) + )) self.clock_regs = create_spidev_iface(self._spi_nodes['lmk']) self.log.debug("Loading C++ drivers...") self._device = lib.dboards.magnesium_manager( @@ -144,11 +146,3 @@ class Magnesium(DboardManagerBase): print("%08X" % self.radio_regs.peek32(i + j)), print("") - def read_eeprom_v1(self, data): - """ - read eeprom data version 1 - """ - # magnesium eeprom contains - # nothing - return struct.unpack_from("x", data) - |