urukul: proto 8

This commit is contained in:
Robert Jördens 2018-02-12 17:40:33 +00:00 committed by Robert Jordens
parent bc6af03a61
commit 6a6695924f
1 changed files with 2 additions and 3 deletions

View File

@ -70,11 +70,11 @@ def urukul_sta_ifc_mode(sta):
@kernel @kernel
def urukul_sta_proto_rev(sta): def urukul_sta_proto_rev(sta):
return (sta >> STA_PROTO_REV) & 0xff return (sta >> STA_PROTO_REV) & 0x7f
# supported hardware and CPLD code version # supported hardware and CPLD code version
STA_PROTO_REV_MATCH = 0x07 STA_PROTO_REV_MATCH = 0x08
# chip select (decoded) # chip select (decoded)
CS_CFG = 1 CS_CFG = 1
@ -112,7 +112,6 @@ class CPLD:
@kernel @kernel
def sta_read(self): def sta_read(self):
self.cfg_write(self.cfg_reg) # to latch STA
self.bus.set_config_mu(_SPI_CONFIG, _SPIT_CFG_WR, _SPIT_CFG_RD) self.bus.set_config_mu(_SPI_CONFIG, _SPIT_CFG_WR, _SPIT_CFG_RD)
self.bus.set_xfer(CS_CFG, 0, 24) self.bus.set_xfer(CS_CFG, 0, 24)
self.bus.write(self.cfg_reg << 8) self.bus.write(self.cfg_reg << 8)