diff options
author | Martin Braun <martin.braun@ettus.com> | 2017-05-12 16:55:54 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-12-22 15:03:53 -0800 |
commit | 5a4a78de6104333307da68b6a0dfc516291ede69 (patch) | |
tree | a8fad6471d5df0175dd55e4970a018a8cb2d09b4 /mpm/python/usrp_mpm/dboard_manager/lmk_eiscat.py | |
parent | 9dee6175da45440997c8ed82fbf40f8f380dc4a7 (diff) | |
download | uhd-5a4a78de6104333307da68b6a0dfc516291ede69.tar.gz uhd-5a4a78de6104333307da68b6a0dfc516291ede69.tar.bz2 uhd-5a4a78de6104333307da68b6a0dfc516291ede69.zip |
mpm: Factored out common LMK04828 code
Diffstat (limited to 'mpm/python/usrp_mpm/dboard_manager/lmk_eiscat.py')
-rw-r--r-- | mpm/python/usrp_mpm/dboard_manager/lmk_eiscat.py | 33 |
1 files changed, 3 insertions, 30 deletions
diff --git a/mpm/python/usrp_mpm/dboard_manager/lmk_eiscat.py b/mpm/python/usrp_mpm/dboard_manager/lmk_eiscat.py index ee4dd3e38..1628613df 100644 --- a/mpm/python/usrp_mpm/dboard_manager/lmk_eiscat.py +++ b/mpm/python/usrp_mpm/dboard_manager/lmk_eiscat.py @@ -20,30 +20,20 @@ LMK04828 driver for use with Magnesium import time from ..mpmlog import get_logger +from ..chips import LMK04828 -LMK_CHIP_ID = 6 - -class LMK04828EISCAT(object): +class LMK04828EISCAT(LMK04828): """ LMK04828 controls for EISCAT daughterboard """ def __init__(self, regs_iface, ref_clock_freq, slot=None): - slot = slot or "-A" - self.log = get_logger("LMK04828"+slot) + LMK04828.__init__(self, regs_iface, slot) self.log.trace("Using reference clock frequency {} MHz".format(ref_clock_freq/1e6)) assert ref_clock_freq in (10e6, 20e6) self.ref_clock_freq = ref_clock_freq - self.regs_iface = regs_iface self.init() self.config() - def pokes8(self, addr_vals): - """ - Apply a series of pokes - """ - for addr, val in addr_vals: - self.regs_iface.poke8(addr, val) - def init(self): """ Basic init. Turns it on. Let's us read SPI. @@ -201,23 +191,6 @@ class LMK04828EISCAT(object): )) self.log.info("LMK init'd and locked!") - def get_chip_id(self): - """ - Read back the chip ID - """ - chip_id = self.regs_iface.peek8(0x03) - self.log.trace("Read chip ID: {}".format(chip_id)) - return chip_id - - def verify_chip_id(self): - """ - Returns True if the chip ID matches what we expect, False otherwise. - """ - chip_id = self.get_chip_id() - if chip_id != LMK_CHIP_ID: - self.log.error("wrong chip id {0}".format(chip_id)) - return False - return True # TODO delete this # def enable_sysref_pulse(self): |