aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/python/usrp_mpm/dboard_manager/magnesium.py
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2017-05-02 12:54:55 -0700
committerMartin Braun <martin.braun@ettus.com>2017-12-22 15:03:52 -0800
commitdf9ca47ed1301eb131fdc0dbdd1e2ab052549aff (patch)
tree65bf2bf1538663485c5b53c779848039327216fd /mpm/python/usrp_mpm/dboard_manager/magnesium.py
parent0c5c2f1834d3912e41ff3aa2480b1fd632aa49bd (diff)
downloaduhd-df9ca47ed1301eb131fdc0dbdd1e2ab052549aff.tar.gz
uhd-df9ca47ed1301eb131fdc0dbdd1e2ab052549aff.tar.bz2
uhd-df9ca47ed1301eb131fdc0dbdd1e2ab052549aff.zip
mpm: eiscat: magnesium: Removed C++-only SPI ifaces
- EISCAT is now Python only with the exception of the definition of the SPI ifaces - Magnesium uses a Python-generated SPI iface - Removed SPI lock from EISCAT dboard
Diffstat (limited to 'mpm/python/usrp_mpm/dboard_manager/magnesium.py')
-rw-r--r--mpm/python/usrp_mpm/dboard_manager/magnesium.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/mpm/python/usrp_mpm/dboard_manager/magnesium.py b/mpm/python/usrp_mpm/dboard_manager/magnesium.py
index f6db4885c..aa667e1e0 100644
--- a/mpm/python/usrp_mpm/dboard_manager/magnesium.py
+++ b/mpm/python/usrp_mpm/dboard_manager/magnesium.py
@@ -56,10 +56,21 @@ class Magnesium(DboardManagerBase):
"""
self.log.debug("Loading C++ drivers...")
self._device = lib.dboards.magnesium_manager(
- self._spi_nodes['lmk'],
self._spi_nodes['mykonos'],
)
- self.lmk = self._device.get_clock_ctrl()
+ SPI_SPEED_HZ = 1000000
+ SPI_ADDR_SHIFT = 8
+ SPI_DATA_SHIFT = 0
+ SPI_READ_FLAG = 1<<23
+ SPI_WRIT_FLAG = 0
+ self.lmk = lib.spi.make_spidev_regs_iface(
+ dev_node,
+ SPI_SPEED_HZ,
+ SPI_ADDR_SHIFT,
+ SPI_DATA_SHIFT,
+ SPI_READ_FLAG,
+ SPI_WRIT_FLAG
+ )
self.mykonos = self._device.get_radio_ctrl()
self.log.debug("Loaded C++ drivers.")
self.log.debug("Getting Mg A uio...")