diff --git a/artiq/coredevice/i2c.py b/artiq/coredevice/i2c.py index e9de36161..55148402a 100644 --- a/artiq/coredevice/i2c.py +++ b/artiq/coredevice/i2c.py @@ -34,8 +34,8 @@ class PCA9548: On the KC705, this chip is used for selecting the I2C buses on the two FMC connectors. HPC=1, LPC=2. """ - def __init__(self, dmgr, busno=0, address=0xe8): - self.core = dmgr.get("core") + def __init__(self, dmgr, busno=0, address=0xe8, core_device="core"): + self.core = dmgr.get(core_device) self.busno = busno self.address = address @@ -77,8 +77,8 @@ class TCA6424A: On the NIST QC2 hardware, this chip is used for switching the directions of TTL buffers.""" - def __init__(self, dmgr, busno=0, address=0x44): - self.core = dmgr.get("core") + def __init__(self, dmgr, busno=0, address=0x44, core_device="core"): + self.core = dmgr.get(core_device) self.busno = busno self.address = address diff --git a/artiq/coredevice/spi.py b/artiq/coredevice/spi.py index 6221c8f53..20095a8ff 100644 --- a/artiq/coredevice/spi.py +++ b/artiq/coredevice/spi.py @@ -40,8 +40,8 @@ class SPIMaster: :param channel: RTIO channel number of the SPI bus to control. """ - def __init__(self, dmgr, channel): - self.core = dmgr.get("core") + def __init__(self, dmgr, channel, core_device="core"): + self.core = dmgr.get(core_device) self.ref_period_mu = seconds_to_mu(self.core.coarse_ref_period, self.core) self.channel = channel diff --git a/artiq/coredevice/ttl.py b/artiq/coredevice/ttl.py index 9ac12ca48..ef855d6b2 100644 --- a/artiq/coredevice/ttl.py +++ b/artiq/coredevice/ttl.py @@ -10,8 +10,8 @@ class TTLOut: :param channel: channel number """ - def __init__(self, dmgr, channel): - self.core = dmgr.get("core") + def __init__(self, dmgr, channel, core_device="core"): + self.core = dmgr.get(core_device) self.channel = channel # in RTIO cycles @@ -82,8 +82,8 @@ class TTLInOut: :param channel: channel number """ - def __init__(self, dmgr, channel): - self.core = dmgr.get("core") + def __init__(self, dmgr, channel, core_device="core"): + self.core = dmgr.get(core_device) self.channel = channel # in RTIO cycles @@ -232,8 +232,8 @@ class TTLClockGen: :param channel: channel number """ - def __init__(self, dmgr, channel): - self.core = dmgr.get("core") + def __init__(self, dmgr, channel, core_device="core"): + self.core = dmgr.get(core_device) self.channel = channel # in RTIO cycles