forked from M-Labs/artiq
1
0
Fork 0

enable dynamic address configuration in Kasli I2C EEPROM

Signed-off-by: Florian Agbuya <fa@m-labs.ph>
This commit is contained in:
Florian Agbuya 2024-05-07 10:40:52 +08:00 committed by Sébastien Bourdeauducq
parent 193962f31e
commit a8157cd5c9
1 changed files with 2 additions and 2 deletions

View File

@ -25,14 +25,14 @@ port_mapping = {
class KasliEEPROM:
def __init__(self, dmgr, port, busno=0,
def __init__(self, dmgr, port, address=0xa0, busno=0,
core_device="core", sw0_device="i2c_switch0", sw1_device="i2c_switch1"):
self.core = dmgr.get(core_device)
self.sw0 = dmgr.get(sw0_device)
self.sw1 = dmgr.get(sw1_device)
self.busno = busno
self.port = port_mapping[port]
self.address = 0xa0 # i2c 8 bit
self.address = address # i2c 8 bit
@kernel
def select(self):